Visual Studio中:无法创建新的项目(缺少根元素)元素、项目、Visual、Studio

2023-09-03 05:45:06 作者:无可奈何

我刚刚下载的Visual Studio 2010 Ultimate和安装它。然后,我用的Windwos Update来保持它最新。

I just downloaded Visual Studio 2010 Ultimate and installed it. Then I use Windwos Update to keep it up-to-date.

现在,当我想打开一个新的项目,无论什么样的项目有一个错误窗口中显示的告诉我:... \ Microsoft.NETFramework.probs:该项目文件无法加载。缺少根元素。

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.

不知道如何解决这个问题?我相信有关.NET 4.0的安装是否正确。而且我也试图寻找解决办法,但最答案的定做,以现有的项目。

Any idea how to fix that? I am sure about .Net 4.0 is correctly installed. And I also tried to search for the solution but most answers reffering to existing projects.

推荐答案

我无法找到一个解决方案在其他地方,当我遇到这个的VisualStudio2013防爆preSS(桌面)制作的VisualC ++解决方案时。经营我的第一个命令是补丁安装然后完全重新安装VS,这两个证明是不成功的。于是我开始指定的文件夹中闲逛,我发现,Visual Studio中试图读取该文件有一大堆的什么也没有。 (VS提到的文件位于C:\用户(我)\应用程序数据\本地\微软\的MSBuild \ V4.0)

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)

由于设置了造成问题的原因,我删除了在问卷Microsoft.Cpp.Win32.user.props-文件和Visual Studio又可以创建项目。我怀疑这是因为VS是刚刚加载默认了,但我不知道。虽然这可能不是最好的解决方案,它为我工作。

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.