Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

build error, warning MSB3258

I have recently moved my solution from my main dev machine using vs2010 pro sp1 to a new machine. The setup is supposed to be the same except its failing to build.

Its giving errors like

c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360,9): warning MSB3258: The primary reference "C:\rep\hms\trunk\ikassystemv3\ikasDAL\bin\Debug\ikasDAL.dll" could not be resolved because it has an indirect dependency on the .NET Framework assembly "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which has a higher version "4.0.0.0" than the version "2.0.0.0" in the current target framework.

However all all the libraries in question are set to use the .net 2 framework and I need it this way or else it will break stuff that uses them.

However for some reason it seems to think that somehow my .net 2 system libs are somehow referencing .net 4 stuff. All the referenced libs are .net 2

You can see my build output here

http://tinyurl.com/bnugru4

like image 368
Steed Avatar asked Nov 12 '12 22:11

Steed


1 Answers

I've seen this problem when using a CopyLocal project reference and changing the target framework (i.e. .NET 4 to 2) on the dependent project (i.e. ikasDAL.dll).

If that is the case here, deleting the output folder (i.e. C:\rep\hms\trunk\ikassystemv3\ikasDAL\bin\Debug) and rebuilding should fix the whole thing.

like image 167
Christoffer Avatar answered Oct 31 '22 23:10

Christoffer