Last post Apr 01, 2016 01:03 AM by lextm
Mar 30, 2016 12:54 PM|kryptong|LINK
the reason is I'm posting this here is that my problem accurs randomly on our deployed App. For performance reasons, we put CopyLocal to false for some references. After deployement, application worked fine, but from time to time it generates dll missing
error for features that worked previously. no change has been done to the application. this error accurs suddenly and randomly.
Any idea why ? your help or thoughts are much appreciated
Mar 31, 2016 06:32 AM|Angie xu - MSFT|LINK
but from time to time it generates dll missing error for features that worked previously.
In my opinion, it's recommended to make sure that in your reference properties you have "Copy Local" = True, perhaps it will fix this issue.
Have a good day.
Mar 31, 2016 07:45 AM|lextm|LINK
For performance reasons, we put CopyLocal to false for some references.
Who told you that will improve performance? A reference, unless merged with your binaries with a tool such as ILMerge or IL Repack, still needs to be loaded from somewhere, so either the app finds it in GAC, or does not find it with an exception.
Such exceptions can be intermittent, when such a reference might only be required by a small portion of code.
Mar 31, 2016 08:36 AM|kryptong|LINK
Finding it from somewhere is more performant than copying it in a bin than go getting it from there .
Besides by doing that we enhanced build time by 50 % reduction. Of course, we have though problems with exceptions that happens randomly, yes randomly because some features works then all of a sudden they just start to throw an exception
Apr 01, 2016 01:03 AM|lextm|LINK
It is more of a gain a compilation/build time as you observed, as CopyLocal does significantly impact that.
But the DllNotFoundException at runtime can be caused by a completely different thing if the assembly does reside in your bin folder. So if you do want to troubleshoot that, focus on that.