Visual Studio: Cannot create new project (Root element is missing)
I just downloaded Visual Studio 2010 Ultimate and installed it. Then I use Windwos Update to keep it up-to-date.
Now, when I want to open a new project regardless of what kind of project there is an error-window displayed telling me: ...\Microsoft.NETFramework.probs: The project file could not be loaded. root element is missing.
Any idea how to fix that? I am sure about .Net 4.0 is cor开发者_开发知识库rectly installed. And I also tried to search for the solution but most answers reffering to existing projects.
Maybe the project templates got corrupt somehow. You should be able to reset these using:
devenv.exe /installvstemplates
see: http://msdn.microsoft.com/en-us/library/ms247116.aspx
You could also try deleting your visual studio settings from "my documents\visual studio 2010\settings". A lot of there are xml files also. !!! Be careful here as your projects are also stored near here by default !!!
Also if this is the result right after a fresh install of VS i would personally remove/reinstall it as you can only guess what else it had currupted during install.
I was unable to find a solution elsewhere when I encountered this for VisualStudio2013 Express (for desktop) when making a VisualC++ solution. My first order of business was to patch the install then completely re-install VS, both of which proved unsuccessful. So I started poking around in the folder specified, and I discovered that the file Visual Studio was trying to read had a whole bunch of nothing in it. (The file VS mentioned was located at C:\Users(me)\AppData\Local\Microsoft\MSBuild\v4.0)
Since the settings were causing the problem, I removed the file in question- Microsoft.Cpp.Win32.user.props- and Visual Studio was able to create projects again. I suspect this is because VS is just loading defaults now, but I'm not sure. While this is probably not the best solution, it worked for me.
精彩评论