System.dll in Mono dependencies

Hi everybody,

I have recently used System.Xml in my project which makes the webplayer build 800KB bigger.
Now I have removed the use of System.Xml but in the Editor Log it still shows me the dependency and includes it into the build. I have deleted the content of the ScriptAssemblies folder, but also it didnt help.

I have searched in my whole project map for “using System.Xml” and wherever it is found it is commented out.

Whatelse can I try? Can I see from where unity gets the System.Xml (which script or object)?

Here#s the Editor Log:

Mono dependencies
Boo.Lang
Mono.Security
System
System.Configuration
System.Core
System.Security
System.Xml
UnityScript.Lang
mscorlib

For none of the System. dependencies I get a result when searching my scripts for it.
Also there is no object in my project view that makes use of System.Xml if that is of interest.

Any ideas?

What version of Editor do you use? Is it Unity iPhone or Unity (as you’re talking about webplayer)?

I have Unity 2.5.1f5 (not for iPhone), Wozik.

why are you in iphone forum then? =)

I see your point ;)).

How can i change the forum of this messages? Can i move them?

No, but I can and shazam… it moves.

tam tam :)…

now to come back to the original topic:
does anybody has an idea how i can get the sytsem.xml out of my build?

I guess it’s possible that Unity makes a note of which DLLs need to be added to a project, but then keeps that note even after the DLL references have been removed from the code. I’d recommend you e-mail support@unity3d.com about this. It might be useful to send along the project or a stripped-down version of it.

Have you tryied to reimport all the assets?

Any progress on this matter? I have more or less the same problem. We have no references at all to System.xml but it is added to the build anyway.

Thanks,
//Ohm

Bump.

Same here.

Are you guys still getting this problem? if so would you be able to send over a project in which you are experiencing this issue over to support@unity3d.com (uploading the project via ftp) or attach it to a bug report using the in editor bug reporting tool and let me know when it has been added.

Any solution to this? I’m having the same problem.

I found a hacky solution to this.

  1. Build the project as normal
  2. Look in the Temp/BuildingPlayer/Data directory for System.Xml.dll and delete it
  3. Make an empty text file called System.Xml.dll and lock it (control click and get info)
  4. Build the project again, this time it can’t overwrite the System.Xml.dll so it is effectively removed from your build.

Further to this after hacking around trying to figure out which dll’s were needed and which not using my method outlined above I found the following interesting thing.

If I make a 0 kb file for System.Core lock it and rebuild, then unlock it again and rebuild System.dll dissappears along with System.Xml, System.Security, and System.Configuration.

So System.Core seems to need a poke with a big stick to get it to play nice with the other dll’s

My web app shrank from 750Kb to 220Kb which is some saving!

Hopefully all this will get fixed in U3… :evil:

This might help make things a bit clearer:

http://forum.unity3d.com/threads/77497-iOS-Project-linking-against-System.Xml.DLL-and-System.DLL?p=544185

HTH!

  • jmpp