The error reads,
TargetFrameworkMoniker: An error occurred saving the project file 'yadayada.csproj'. Access is denied.
I'm trying to switch from .net 3.5 to .net 4.0 or higher.
The project is hooked into TFS in Visual Studio 2010 (also tried VS 2013, same error). I'm in a VM environment.
Any clues about this error? Google returns very little information. It seems like I have proper access to the file, but how is VS accessing it?
I was getting this error and it ended up being the app.config file, as well, that was write-protected. Changing the target framework not only changed
in the .csproj file but also changed the project's app.config:
(I wanted to add this as a comment to pixelmeow's Jun 27 answer, but StackOverflow policy prevents me from doing so until I have enough reputation points. I did vote for him/her, though!)