vcxproj 文件不会加载到解决方案中

发布于 2024-08-30 09:47:41 字数 338 浏览 4 评论 0原文

我们最近刚刚切换到 VS 2010,我有一个运行良好的解决方案。今天早上,当我尝试加载解决方案时,出现错误:

“已添加具有相同密钥的项目。”

当它尝试加载我们的主要项目之一但未加载时,就会发生这种情况。

我认为问题出在我的解决方案上,所以我创建了一个全新的空解决方案,并尝试加载相同的 vcxproj 并得到完全相同的错误。

当我将项目文件恢复到以前的版本时,它可以工作,所以显然它是 vcxproj 文件中的内容。然而,我似乎是办公室里唯一受到影响的人。因此,vcxproj 文件和我的计算机的某种组合似乎是问题所在。

以前有人见过这样的事情吗?关于解决方案有什么想法吗? 谢谢

We've just recently switched to VS 2010 and i had a solution that was working fine. This moring when i try to load the solution i get the error:

"An item with the same key has already been added."

This occurs when it is trying to load one of our main projects and it is not loaded.

I assumed the problem was with my solution so i created a brand new empty solution and tried to load the same vcxproj and got exactly the same error.

When i revert the project file to a previous version it works, so apparently it's something in the vcxproj file. However it also appears that i'm the only one in the office that is affected. So some combination of the vcxproj file and my computer seems to be the issue.

Has anyone seen anything like this before? Any ideas on a solution?
Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

数理化全能战士 2024-09-06 09:47:41

仍然不确定导致问题的原因,但是删除所有临时文件:

<proj>.vcxproj.user
<proj>.vcxproj.filters
<proj>.vcproj.<domainname???>.<username>.user
<proj>.suo

已解决问题。

我怀疑只是

<proj>.vcxproj.user
<proj>.vcxproj.filters

或两者都真正修复了它,但我确实删除了所有 4 个,因此可能是其中任何一个。

导致中断的 vcxproj 文件的更改是重命名一些文件并添加一些文件,所以我的猜测是生成的文件之一具有阻止加载的陈旧引用。

Still not sure what caused the issue however deleting all temporary files:

<proj>.vcxproj.user
<proj>.vcxproj.filters
<proj>.vcproj.<domainname???>.<username>.user
<proj>.suo

has fixed the problem.

I suspect it was just

<proj>.vcxproj.user
<proj>.vcxproj.filters

or both that actually fixed it but I did delete all 4 so it could have been any of them.

The change to the vcxproj file that casued the break was renaming some files and adding some files, so my guess is that one of the generated files had a stale reference that was blocking the load.

゛时过境迁 2024-09-06 09:47:41

如果您弄清楚如何再次获取该消息,也许您可​​以在 https://connect.microsoft.com 上打开一个错误/ 并附加压缩的 .vcxproj 和 *.sln 文件,以便我们可以修复它。

丹 [msbuild]

If you figure out how to get the message again, maybe you could open a bug at https://connect.microsoft.com/ and attach the zipped up .vcxproj and *.sln files so we can fix it.

Dan [msbuild]

挽容 2024-09-06 09:47:41

我有同样的问题在 Windows 资源管理器中执行以下操作

根据我的理解,即使您从 VS2012 创建每个简单的 Visual C++ Windows Phone 项目,您也会遇到相同的错误。在这种情况下,我怀疑问题与你的VS有关。

根据康拉德在该帖子中对类似问题的回复: http://social.msdn.microsoft.com/Forums/en-US/cba01040-067e-4ac3-ba4c-a8a14ba3c45d/unable-to-read-the-project -file,我觉得你可以检查这个文件:C:\Program Files(x86)\MSBuild\Microsoft\WindowsPhone\v7.0\Microsoft.Cpp.Windows Phone.7.0.targets是否在你的系统上。如果没有,我怀疑你的VS安装有问题。

如果您没有使用 VS Express,您可以找到 IDE 文件夹,然后运行以下命令来检查是否有帮助:

Please open Windows Explorer, and navigate to  <Visual Studio Installation Path>\Common7\IDE
Devenv.exe /SafeMode: Launches the IDE in safe mode loading minimal windows.
Devenv.exe /ResetSettings: Restores the IDE's default settings, optionally resets to the specified VSSettings file.
Devenv.exe /ResetAddin: Removes commands and command UI associated with the specified Add-in.
Devenv.exe /ResetSkipPkgs: Clears all SkipLoading tags added to VSPackages.

如果没有帮助,我建议您尝试修复您的 VS 或卸载它,然后重新安装。

i had same probleb do the following thing in windows explorer

Based on my understanding, you will get the same error even when you create every simple Visual C++ windows phone project from VS2012. In this case, I doubt that the issue is related to your VS.

And according to Konrad’s reply in this thread with similar issues: http://social.msdn.microsoft.com/Forums/en-US/cba01040-067e-4ac3-ba4c-a8a14ba3c45d/unable-to-read-the-project-file, I feel that you can check if this file: C:\Program Files(x86)\MSBuild\Microsoft\WindowsPhone\v7.0\Microsoft.Cpp.Windows Phone.7.0.targets is on your system. If it is not there, I doubt that your VS installation is wrong.

If you are not using VS Express, you could locate to the IDE folder then run these commands to check if it can help:

Please open Windows Explorer, and navigate to  <Visual Studio Installation Path>\Common7\IDE
Devenv.exe /SafeMode: Launches the IDE in safe mode loading minimal windows.
Devenv.exe /ResetSettings: Restores the IDE's default settings, optionally resets to the specified VSSettings file.
Devenv.exe /ResetAddin: Removes commands and command UI associated with the specified Add-in.
Devenv.exe /ResetSkipPkgs: Clears all SkipLoading tags added to VSPackages.

If no help, I suggest you try repairing your VS or uninstall it and then reinstall it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文