简体   繁体   English

Microsoft Visual Studio无法打开文件

[英]Microsoft Visual Studio not opening files

Whenever I try opening a .cs file with Visual Studio, I get this error : 每当我尝试使用Visual Studio打开.cs文件时,都会出现此错误:

Expected 1 export(s) with contract name "Microsoft.VisualStudio.Utilities.IContentTypeRegistryService" but found 0 after applying applicable constraints. 预期有1个出口,合同名称为“ Microsoft.VisualStudio.Utilities.IContentTypeRegistryService”,但在应用适用的约束后发现为0。

Visual Studio had been working working fine for me, then all of a sudden this started happening. Visual Studio一直在为我工作正常,然后突然开始发生这种情况。 I tried deleting the cache and even uninstalling the program altogether, but the error persists. 我尝试删除缓存,甚至完全卸载程序,但是错误仍然存​​在。 I checked online everywhere, but nobody seems to have had this issue before. 我到处都在线检查过,但以前似乎没有人遇到过这个问题。 Here is a picture . 这是一张照片

The best SO link I've found gives heaps of different options - see here - I would suggest running a repair on the install and try things other than clearing the cache. 我找到的最好的SO链接提供了很多不同的选项- 请参阅此处 -我建议在安装时进行修复,并尝试除清除缓存外的其他方法。

The referenced link indicates a bunch of different conditions that affect how you resolve the issue. 引用的链接指示了许多不同的情况,这些情况会影响您解决问题的方式。 For example are you running express/community edition or professional etc? 例如,您运行的是快速/社区版还是专业版?

Without knowing what causes the cache to get corrupted I can't answer exactly how to fix it. 不知道是什么原因导致缓存损坏,我无法确切回答如何解决它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM