I wrote a program that makes a reference to Microsoft.Web.Administration.dll, which is not present on Windows Server 2003.
The program checks for the os and does not reference the dll if the os is 2003.
if(OSVersion == WindowsServer2003)
//do the job without referencing the Microsoft.Web.Administration.<br>
else if(OSVersion == WindowsServer2008)
//reference the Microsoft.Web.Administration.dll file.<br>
When I tested this program on Windows Server 2003, an error occured telling me it couldn't locate the Microsoft.Web.Administration.dll.
But when I separated the if-else block into 2 different methods as below, and the error did not occur.
if(OSVersion == WindowsServer2003)
//do the job without referencing the Microsoft.Web.Administration.<br>
else if(OSVersion == WindowsServer2008)
//DoIt2008Style();
So I wanted to know about reference file loading time in more detail. could you point me to some resources?
When you enter a method that references a type in another assembly. Here is an example when trying to delay load x86 and x64 assemblies.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With