Assembly HintPaths not correct

Mar 26, 2012 at 12:54 PM
Edited Mar 26, 2012 at 2:20 PM

I'm not sure if this is purely a Visual Studio 2010 issue so apologies if it is.

I have the following file structure

 

 

MySolutionDir

----Packages

----Project1

----MySolution.sln

ReferencedProjectsDir

----Project2

----Project3

 

 

Project 1 has a reference to Project2+3 and there are numerous NuGet packages added to each (assemblies deposited in the packages dir inside MySolutionDir). The problem I'm having is all projects have had their NuGet assembly references written as follows

 

..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll

 

 

This is fine for Project1 but obviously there is no ../packages dir for Project2 and 3 so the build fails. 

Any suggestions?

Mar 26, 2012 at 10:50 PM

does your solution include Project2 and Project3?

Mar 27, 2012 at 6:42 AM
Edited Mar 27, 2012 at 6:44 AM

Hi, yes it does.

 

Sorry, I should have mentioned it builds fine in VS but fails when using MSBuild due to the reference paths being wrong.

Mar 28, 2012 at 7:50 AM

I've just realised, this project was structured differently when the packages were added, hence they were correct then but not now. Adding a new NuGet package now writes the correct path in the project file.