0

Ever since my latest windows update, (which system restore is failing to undo) I can't load any projects with visual studio 2010. The project are greyed out (unavailable) and when I try to reload them I get the error:

C:\Users\Benoit\Documents\Visual Studio 2010\Projects\Test123\Test123\Test123.csproj : error  : Unable to read the project file 'Test123.csproj'. Could not load file or assembly 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

I tried creating new projects: same error

I tried creating different type of projects (command prompt, silverlight, windows phone): same error

Deleting the .suo and .user files did not change anything

I did not move the projects

Using Visual Studio 2010 with Windows Vista

user2868068
  • 3
  • 1
  • 2
  • Looks like your GAC got screwy. You could try uninstalling and reinstalling .NET 4.0 – lc. Oct 10 '13 at 17:27
  • That worked! (only had to repair actually). edit: Doesn't look like I can mark a comment as answer :S – user2868068 Oct 10 '13 at 18:00
  • Glad it was that easy. I've put it as an answer so maybe other people with the same problem can find it – lc. Oct 11 '13 at 03:01

1 Answers1

0

It looks like the Global Assembly Cache (GAC) is messed up, or possibly the update has done something with the Microsoft.Build assembly file itself.

Try repairing .NET 4.0, and if that does not work you can try completely uninstalling and reinstalling the framework.

lc.
  • 113,939
  • 20
  • 158
  • 187