相关疑难解决方法(0)

何时引用了Assemblies加载?

我编写了一个程序来引用Microsoft.Web.Administration.dll,这在Windows Server 2003上不存在.

程序检查操作系统,如果操作系统是2003,则不引用dll.

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>
Run Code Online (Sandbox Code Playgroud)

当我在Windows Server 2003上测试此程序时,发生错误告诉我它无法找到Microsoft.Web.Administration.dll.
但是当我将if-else块分成如下2种不同的方法时,并没有发生错误.

if(OSVersion == WindowsServer2003)
   //do the job without referencing the Microsoft.Web.Administration.<br>
else if(OSVersion == WindowsServer2008)
   //DoIt2008Style();
Run Code Online (Sandbox Code Playgroud)

所以我想更详细地了解参考文件加载时间.你能指点我一些资源吗?

.net dll reference

5
推荐指数
1
解决办法
1786
查看次数

标签 统计

.net ×1

dll ×1

reference ×1