tags:

views:

72

answers:

2

Hi,

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 some helpful advice

Thanks Karandeep Malik

+4  A: 

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

klausbyskov
A: 

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

Joe Gauterin