Every time I add a reference to a web project in visual studio 2008 that is in my GAC, it adds the reference as a GAC reference and doesn't copy the file to my bin directory. But for deployment purposes, I would like to add the reference as a non-GAC reference so it adds the dll to my bin directory. I've tried using the browse button to select the reference instead of picking from the list window, but that adds a GAC reference too.
These references all have the .refresh file with them and there is not an option to copy local in the properties of the file.
Any help please?!?
How do I debug a Pocket PC app running over a wireless network?
Is it possible to have multiple 'TestClass'es in MSTest?
VC2008, how to turn CLR flag off for individual files in C++/CLI project
In case anyone else comes here looking for a solution.....
TFS customization - Team Foundation Server question
You are correct, of course, that a web project does not give you the copy local option on your references that a normal project does, so the Copy Local...
Opening C# 2008 in 2005
solution is a non-starter..
How to change registration company name for Visual Studio 2008?
I worked around this problem by simply adding an existing file to my web app's bin directory.
Tools / Tips for refactoring Visual Studio projects
The drawback is that it doesn't add the refresh reference, so if you rebuild the external file you'll have to manually refresh the local copy..
How do I offer automatic updates for my program in Visual Basic 2008?
. My problem was a little bit different.
I wanted a non-GAC version of a .dll so my build server could compile the project without having the .dll in question installed on that server.
. To fix this, I edited the .csproj (.vbproj) file manually (using notepad) and updated the reference file to point to the local version.
If this proves troublesome in the future, I'll have to uninstall the project and just use the .dll.
. In my case, I changed the line: .
<Reference Include="Microsoft.Data.Entity.CTP, Version=188.8.131.52, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
<Reference Include="Microsoft.Data.Entity.CTP, Version=184.108.40.206, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\Lib\Microsoft.Data.Entity.CTP.dll</HintPath> </Reference>
..\Libis a directory at the solution level, one directory up from the project file..
. I actually create a small helper project to add all the files in my solution\Dependencies folder.
Sorry for the VB.NET, but it's quick and appears to do the same thing VS would do..
For Each fullFileName In Directory.GetFiles("..\..\..\Dependencies\", "*.DLL") Dim shortFileName = Path.GetFileName(fullFileName) Dim refreshFileName = shortFileName + ".refresh" Dim contents = "..\Dependencies\" + shortFileName File.WriteAllText(refreshFileName, contents) Next
The only way is to install framework on target computer.. It it is a third party assembly then you could copy assembly to bin directory manually from directory where it is located.. You may also try to remove assembly from GAC by gacutil.exe in Windows SDK and look what will happen now if you try to add reference by 'Browse' tab..
It solved the problem.
All referenced dlls were added to the bin folders..