2

The project contains both c# and javascript source code. And I use visual studio 2015 (3) for the development. Since installing the TypeScipt 2.0.3 I cannot open the .js source files in editor. The message that pops up is: An error occurred trying to load the page.

No exports were found that match the constraint: ContractName Microsoft.CodeAnalysis.Editor.TypeScript.ScriptContexts.ITypeScriptProjectProvider RequiredTypeIdentity Microsoft.CodeAnalysis.Editor.TypeScript.ScriptContexts.ITypeScriptProjectProvider

And it is also appearing in the TypeScript Build tab under solution properties.

Has anyone experienced the same issue or has any ideas on how to solve this? I'd like to edit the .js files in Visual Studio.

Miroslav Radojević
  • 487
  • 1
  • 5
  • 20

2 Answers2

8

Try deleting the folder

"C:\Users\<userName>\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache"

and then restart Visual Studio. This worked for me.

Yatharth Varshney
  • 1,973
  • 20
  • 22
  • Correct answer. Deleting ComponentModelCache helps. Another thread where this issue has been clarified: https://stackoverflow.com/questions/17596543/error-message-no-exports-were-found-that-match-the-constraint-contract-name – Miroslav Radojević Oct 24 '17 at 14:32
0

Delete the following folder and restart Visual studio.

C:\Users\yourusername\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache

N.B. : The AppData folder may not appear on the first place. Unhide all hidden items from View tab and then follow the path.

Thomas Rollet
  • 1,573
  • 4
  • 19
  • 33