今天早上,我在打开Visual Studio解决方案时遇到了一个问题,当我试图运行它时,它说:
没有找到与约束契约名称匹配的导出
我该如何解决这个问题?
今天早上,我在打开Visual Studio解决方案时遇到了一个问题,当我试图运行它时,它说:
没有找到与约束契约名称匹配的导出
我该如何解决这个问题?
当前回答
删除组件模型缓存对我不起作用(好吧,上面给出的相对目录在我的机器中不存在)。相反,我安装了Visual Studio 2012 Express的扩展。菜单工具→扩展和更新…→在线→任意选择然后下载。这显然使缓存无效,导致Visual Studio重新构建它。
这是我的消息来源。
其他回答
我使用的是Visual Studio 2012。安装Visual Studio 2013 web express后,当我想在Visual Studio 2012中运行或打开任何项目时,它会显示以下错误:
“没有发现与约束合同名称匹配的导出”。
我还尝试了上面的解决方案来清除ComponentModelCache, 但是我没有找到文件夹。我解决了我的问题:修复Visual Studio 2012
对于Express版本的软件,您需要的文件夹在一个略微不同的位置:对于Express 2012 For Web,它是C:\Users\XXXXXXXX\AppData\Local\Microsoft\VWDExpress -不在Visual Studio文件夹中。
删除组件模型缓存对我不起作用(好吧,上面给出的相对目录在我的机器中不存在)。相反,我安装了Visual Studio 2012 Express的扩展。菜单工具→扩展和更新…→在线→任意选择然后下载。这显然使缓存无效,导致Visual Studio重新构建它。
这是我的消息来源。
两年后,我收到了同样的错误信息。 这次是一个不同的问题,与。net Core dnx有关。
我在Stack Overflow上找不到答案,但有一个GitHub问题包含一个解决方案:https://github.com/aspnet/Home/issues/1455
下面是解决方案中最重要的部分:
Delete the entire C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\DNX directory. (As far as I understand, it belongs to the old version of ASP.NET Core RC1, which for some reason is still shipped even with Visual Studio 2015 Update-3). Delete the C:\Users\<user>\AppData\Local\Microsoft\VisualStudio\14.0\devenv.exe.config file. Run the Developer Command Prompt for Visual Studio 2015 as Administrator, and execute the devenv /setup command. The new devenv.exe.config file is generated. This time there are many assemblies that refer to the C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\DotNet directory. Run the Visual Studio 2015 and check that it shows the Microsoft .NET Core Tools (Preview 2) 14.1.20624.0 in the Help => About Microsoft Visual Studio menu.
感谢olegbroov在GitHub上的帖子,他发现了这一点。
我不得不卸载一些外部组件,如Postsharp和Apex,然后它就工作了。我也尝试了选择的解决方案,但它给了我更多的错误。
在启动Visual Studio 2013 Ultimate时,我遇到了同样的问题,这里的解决方案对我不起作用。我试着删除上述文件夹并重新启动Visual Studio,但它不起作用。
然而,我也遇到了其他问题,比如微软。visual studio包没有正确加载,页面“312e8a59-2712-48a1-863e-0ef4e67961fc”没有找到VS 2012。后者指的是团队资源管理器窗口中的一条消息,说“无法找到页面‘somenumber’”。
因此,我以管理权限在Visual Studio命令提示符上运行devenv /setup。它成功了,现在一切都好了。