0

Whenever I try opening a .cs file with Visual Studio, I get this error :

Expected 1 export(s) with contract name "Microsoft.VisualStudio.Utilities.IContentTypeRegistryService" but found 0 after applying applicable constraints.

Visual Studio had been working working fine for me, then all of a sudden this started happening. 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.

Tinymanx
  • 1
  • 1
  • Is it any .cs file or a specific one? Also is this I. The context of an open solution or is it being opened standalone? – strongbutgood Dec 30 '16 at 23:56
  • Its just a regular .cs file. I've tried with multiple ones, but it didn't work for any of them. I'm kind of new to C# and I don't know too much about it, what do you mean by open solution or standalone? – Tinymanx Dec 31 '16 at 03:08
  • "Visual Studio was working fine" - does it work fine when working with vb? How long has it been working fine for? Can you list software versions? Are you working on a project or are you using VS to open individual files without them being part of a project? – strongbutgood Dec 31 '16 at 04:45
  • It doesn't work with vb. I got Visual Studio 4 days ago and it had been working fine until yesterday when this error started popping up. I haven't tampered with the files at all. I use Visual Studio 2015 (The most recent version) and I use it to open individual files. – Tinymanx Dec 31 '16 at 14:02
  • The best SO link I've found gives heaps of different options - http://stackoverflow.com/questions/17596543/error-message-no-exports-were-found-that-match-the-constraint-contract-name - I would suggest running a repair on the install and things other than clearing the cache. – strongbutgood Dec 31 '16 at 19:07

1 Answers1

0

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.

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.

Community
  • 1
  • 1
strongbutgood
  • 655
  • 7
  • 22