Question VS 2010 compiles .NET 2 project to .NET 4

Administrator

VB.NET Forum Admin
Joined
Jun 3, 2004
Messages
1,462
Programming Experience
10+
I have a web solution that contains 5 class libraries and one asp.net web site project. It's an e-commerce solution that is compiled for .NET 3.5 (some class libraries are set to .NET 2).

When I got VS 2010 installed I decided to give a try and upgrading it to .NET 4 but that didn't go so well, can't remember why. I reverted the source code control, cleared all local files, re-downloaded from source control and went back to VS 2008.

I decided to give it another try with VS 2010 due to some issues with VS 2008 but when I build the solution it fails because one of the class libraries is compiling to .NET 4. I checked the project settings and it is set to .NET 2. I have tried doing a clean on the solution, that makes no difference, the project always builds the assembly to .net framework 4.x.

I imagine something is getting cached on the system, i.e. msbuild, etc. Does anyone know where to clear this cache so that whatever is holding my class library hostage to .net 4 can actually let it completely recompile and pick up the project settings again?

Thank you.
 
Yep, tried that, doing a clean on the solution, I think it's something cached somewhere and probably related to MSBuild caching.
 
This is all a bit of a shot in the dark but maybe try changing the target to .NET 4.0, rebuild, then change it back to 2.0 and rebuild again. Maybe the change will sort out whatever's got "stuck".
 
Yeah, I've tried all that and it's just pooched because of whatever VS 2010 is doing to cache the build process. Just seeing if anyone knew this msbuild system and possibly where the cache is that I can clear.
 
Back
Top