I've got a asp.net project that references Enterprise Library DLL's. I can build and deploy my project but the deployment build fails because it can't find the DLL's. I peeked at the properties for Microsoft.Practices.EnterpriseLibrary.Common, for example, and I notice that the file path is where it was installed in \Program Files\yada yada... I've attempted Add Reference to my project and specifically choose the dll from my /lib folder which gets deployed with my project. VS just seems to say "yeah, sure". The file path remains to be the one under "Program Files..."--what I am assuming is a GAC reference. I tried looking at the GAC to uninstall, but I don't see it there. Can someone help me explain to VS that I really do want this local file?
Asked
Active
Viewed 4,234 times
1

Joel Coehoorn
- 399,467
- 113
- 570
- 794

malckier
- 1,052
- 2
- 14
- 22
-
but if the assembly is loaded from Gac the address won't be c:/program files. it is either c:/windows/assemblies or C:\Windows\Microsoft.NET\assembly. – Niloofar Jan 16 '17 at 08:20
2 Answers
1
Okay, I had to dig into the .proj files. Under are tags. You can add within the Reference tags to direct the project to a specific DLL instance.
<ItemGroup>
<Reference Include="Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" >
<HintPath>..\lib\Microsoft.Practices.EnterpriseLibrary.Common.dll</HintPath>
</Reference>
...

malckier
- 1,052
- 2
- 14
- 22
-
Or better yet: I copied the dll's out to a separate directory and uninstalled the Enterprise Library package from my machine. – malckier Nov 11 '10 at 16:09
0
Highlight the reference in the Solution and change the "Copy Local" in the properties window to True, see if that helps.

CodingGorilla
- 19,612
- 4
- 45
- 65
-
So the .dll files are in your /bin folder, but the app still complains that it can't find it? – CodingGorilla Nov 10 '10 at 21:57
-
Yes. What happens is that when I go through my deploy process, the code is copied to another server, where NUnit tests are run. The tests are failing because Visual Studio is sees the references as if they were native code libraries, like System. or Microsoft.CSharp. I don't have Enterprise library installed on the destination server. – malckier Nov 10 '10 at 22:07