- Home /
How to know which code depends on System.dll in mono C#?
I made a unity android game and upon opening its apk I can see "system.dll" library included and this is not one of the compulsory librarys, So in order to reduce the size of the apk I don't want this library to be included but I don't know which code depends on this library, is there a way in mono develop to know, where all I am refrencing/using features of "system.dll",
Also i initially thought that writing "using System;" caused "system.dll" to be included but if I comment "using system;" I find errors in Enum, Boolean,(wrapper classes of primitive types) etc, but upon un-commenting "using system;" and finding the declaration of Enum, Boolean etc, I am taken to "mscorlib.dll" and not "System.dll",
so I concluded that most of the features of System name space are present in "msccorlib.dll" which is compulsary included in unity build, but some are in "system.dll" which are causing the "system.dll" to be included, i am un able to find all the places in code which are causing the "system.dll" to be included is there a way in monodevelop to do that??
Answer by ArkaneX · Oct 07, 2013 at 08:28 AM
In MonoDevelop, in Solution view, you can expand your project (e.g. Assembly-CSharp) and then expand References node. You'll find all the libraries which are used when compiling your project there. Deleting System and then building project in MonoDevelop should yield errors if any types from this assembly were used.
Please also note, that deleting in MonoDevelop is temporary. When you switch to Unity your project file will be regenerated.
It worked But I'll like to add that when you build from $$anonymous$$onoDevelop it will give you errors like - default parameters not supported etc, even though no errors are seen when building from unity, so in order to properly do what Arkanex said , you have to change the .Net version from 3.0 to 4.0 in monodevelop general build settings this will take care of those errors and you will be able to build from $$anonymous$$onoDevelop, if you dont do it you wont be able to find errors caused by missing dll,
Your answer
Follow this Question
Related Questions
screenshot 0 Answers
null texture passed to GUI.DrawTexture 0 Answers
Android Development; How to use SDK manager! 1 Answer
How do i use monodevelop 3.0.6 with unity 0 Answers
Scale fit? 1 Answer