20

I don't know what happen with my Visual Studio 2013 Update 2.

When I opened my project, it displayed this message:

No exports were found that match the constraint: ContractName

Microsoft.Internal.VisualStudio.PlatformUI.ISolutionAttachedCollection.Service

RequiredTypeIdentity
Microsoft.Internal.VisualStudio.PlatformUI.ISolutionAttachedCollection.Service

I am really confused. I've tried this solution, but it didn't solve my problem...

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Martino
  • 215
  • 1
  • 2
  • 8
  • 1
    Possible duplicate of [Error message "No exports were found that match the constraint contract name"](https://stackoverflow.com/questions/17596543/error-message-no-exports-were-found-that-match-the-constraint-contract-name) – underscore_d Dec 28 '17 at 12:08

3 Answers3

34

I had the same problem, so I shut down Visual Studio 2013, renamed the folder

C:\Users\{username}\AppData\Local\Microsoft\VisualStudio\12.0\ComponentModelCache

to ComponentModelCache-old, and restarted Visual Studio which rebuilt the ComponentModelCache folder and all is back to normal.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
c0d3p03t
  • 1,675
  • 2
  • 16
  • 14
  • Worked like a charm! This happened when I opened a VS 2010 winform project. Thanks! – Mark Irvin May 08 '15 at 16:35
  • Bravo! Thank you for taking the time to post this solution. Works well! – Matt Cashatt Nov 09 '15 at 17:33
  • Or more generally, on Windows Vista or later, the first part, `C:\Users\{username}\AppData\Local`, is [`%LOCALAPPDATA%`](https://stackoverflow.com/tags/appdata/info) (environment variable). So `%LOCALAPPDATA%\Microsoft\VisualStudio` would lead close to it, whatever the version of Visual Studio it is. – Peter Mortensen Nov 06 '17 at 23:31
  • On older versions of Windows and Visual Studio it might be near `%APPDATA%\Microsoft\VisualStudio`, e.g. `C:\Documents and Settings\Administrator\Application Data\Microsoft\VisualStudio\9.0\DotNetComponents.cache`. – Peter Mortensen Nov 06 '17 at 23:59
  • Thanks. This works for my Visual Studio 2013 - Win form project – Anura Adhikari Dec 12 '21 at 04:20
5

It's not possible to help you without knowing:

  • the complete list of installed extensions,
  • the exact Visual Studio 2013 version,
  • the exact Windows version,
  • a brief reproduction script.

The most important clue you can get about the root cause, can be seen in Visual Studio Activity Log. I suggest starting Visual Studio with activity logging enabled (devenv.exe /log), reproducing the error and checking the log.

bahrep
  • 29,961
  • 12
  • 103
  • 150
  • 5
    it really helped to fix the problem. The main problem and its solution can be found here. http://stackoverflow.com/questions/17574089/microsoft-visual-studio-package-did-not-loaded – manu Aug 05 '14 at 16:47
  • 3
    I had the same problem/warning, I delete all the files in %AppData%\..\Local\Microsoft\VisualStudio\12.0\ and it worked for me once again. Good luck! – Damien Jan 28 '15 at 20:01
  • 1
    This answer is wrong. It is possible - see the answer by c0d3p03t, which worked for me: https://stackoverflow.com/a/28487139/127434 – cja Oct 03 '17 at 12:42
-1

If you download Visual Studio 2013 from Microsoft you will find the path C:\Users\{username}\AppData\Local\Microsoft\WDexpress\12.0\ComponentModelCache.

You should remove the file Microsoft.VisualStudio.Default.cache.

Then restart Visual Studio.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
  • Are you sure about that? [c0d3p03t's answer](https://stackoverflow.com/questions/23847640/error-in-visual-studio-2013-no-exports-were-found-that-match-the-constraint/28487139#28487139) says `C:\Users\{username}\AppData\Local\Microsoft\VisualStudio\12.0\ComponentModelCache`. – Peter Mortensen Nov 06 '17 at 17:11