سؤال

If i reference unused assembly using the /r flag in the command prompt the csc will ignore it.

so what if i reference unused assemblies via the IDE will it show the same behavior ?

and what if i am using other c# compilers other than Microsoft's csc ?

هل كانت مفيدة؟

المحلول

Mono's mcs compiler will not include references unless they're actually used in your app.

And even if they were, the referenced assemblies would only be loaded when used in your app. But since they're not, they'd just waste a few bytes in the assembly.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top