.cs files can't be opened anymore in VS 2013 Professional Update 4

情到浓时终转凉″ 提交于 2020-01-04 14:11:55

问题


I'm facing a problem where I can't open .cs files in Visual Studio 2013 after one day.

It started on Monday: I opened an existing solution and tried to open the Program.cs file but instead was met with the following error message (rough translation):

No exports were found that meet the constraint:

ContractName

Microsoft.VisualStudio.Utilities.IContentTypeRegistryService

RequiredTypeIdentity

Microsoft.VisualStudio.Utilities.IContentTypeRegistryService

I tried opening .cs files in different solutions and always got the same message. The only exception being: Any Visual Studio instance that was opened before the Visual Studio instance in which the exception first occured was/is not affected by this.

I managed to get it working by choosing to repair the Visual Studio installation and rebooting but that only worked until the next day.

I tried searching for that message but got nothing so far.


回答1:


Delete or rename this folder:

C:\users\\AppData\Local\Microsoft\VisualStudio\12.0\ComponentModelCache\




回答2:


I had this issue and seems the file was open - but I could see what pane or anything. So I had to right click on a file and close all documents - then I could open the file again.



来源:https://stackoverflow.com/questions/31424686/cs-files-cant-be-opened-anymore-in-vs-2013-professional-update-4

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!