I have a solution which contains many dll and exe.

I set the Copy Local properties to each of References of all projects (it depends, some must be true, and some must be false).

I build and save the solution, everything is in the right place.

The csproj files seem to be good with <Private>False</Private> or <Private>True</Private> in every section.

If I close VS and re-open my solution, all References are set to true, despite the value of the csproj.

I don't understand what happens, and this is very unconvenient, because I have to re-set Copy Local in each Reference manually.

My collegue, who works on the same VSS base, don't have the problem.

I have not VS SP1 installed, but I have not seen any improvment in that way.

Thanks for any help or suggestion.

Re: Visual C# IDE Visual Studio Set References Copy Local to True


If the project file is in CM then VS can't change it. Is VS auto-checking out the project file whenever you open it I'm not aware of any issues with VS resetting the copy local flag. It could be a problem with your installation but I'm baffled as to what.

I am concerned about why you would want to mix the two modes though. This is adding undo complexity to an already complex system with little gains. The general guidelines are to copy local for all assemblies except those in the GAC (but VS will handle that automatically anyway). Trying to share files in separate directories makes the development and production environments harder to manage IMO. It can also cause problems. For example if you reference assemblies A and B where B is not copied locally and A references B (with copy locally) then B will still get copied into the bin directory and used even though you don't have copy local set, I believe.

Michael Taylor - 10/4/07