开发者

.NET does not search in PATH for my C# DLL

I have a C# dll say dll1 that is referenced by another C# dll say dll2 . The path to dll1 is specified in the env variable PATH. when I try to compile dll2 , the dll2 reports error that it could not find the assembly dll1. I am not sure how I can make this happen I thought PATH was used in Dll search by .Net.

Awaiting s开发者_JAVA百科ome helpful advice

Thanks Karandeep Malik


The PATH is not searched at all. This article on msdn explains how the runtime locates assemblies.


In short: No the .Net framework doesn't use the PATH environment variable to locate assemblies.

In more detail: The .NET assembly lookup rules are arcane to say the least - you'd be better off reading the Microsoft documentation.

Here's the link: http://msdn.microsoft.com/en-us/library/yx7xezcf.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜