Issue with project reference - csproj.user

J

John Lee

Hi,

Here is my issue with VS.NET IDE project reference:

I have a project (myproj.csproj) referencing a non-GACed strongly named
assembly (comp.dll 2.0.1.0) with copy local = true; we also have a comp.dll
2.1.0.0 version GACed. when I close the project and reopen it, the reference
is still ok and point to the right version (2.0.1.0). BUT if I remove the
myproj.csproj.user and then re-open the project, the reference will be
changed by VS.NET IDE to 2.1.0.0 - this will cause a problem for our build
process because when the build master checkout this project file w/o the
myproj.csproj.user file and the reference to comp.dll will be changed to
newer version that exists in GAC. One way of solving this issue is to check
in the myproj.csproj.user (but this sounds wierd), any other good solution
or settings somewhere to force the .csproj to use hard reference such as
C:\VSS\Somewhere and not use the relative path such as "..\..\..\Somewhere"?

Thanks a lot!

John
 
S

Steven Cheng[MSFT]

Hi John,

Welcome to .NET newsgroup.
As for the assembly reference problem you mentioned, this is an expected
behavior since the VS.NET will lookup assembly through the csproj.user file
first( has higher priority). Though there are also "hint path"s in the
csproj (project file), they'll only be referenced when IDE fail to find
assembly in the csproj.user specified path. And when we deleting the
csproj.user , some default wellknown location will be searched such as GAC.
Currently there seems haven't any better means to let the IDE directly
reference the paths in csproj file or ingore the csproj.user file. Also the
following blog article has also discussed on this problem:

#Assembly Reference Resolving in Visual Studio.
http://objectsharp.com/Blogs/barry/archive/2004/10/29/988.aspx

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top