I am using Visual Studio 2013 SP1.

After installing Roslyn I wanted to play with the samples. In the samples folder there is a project called MakeConstCS. So I hit F5, the experimental VS env is loaded. Then I create a new project and boom.

Normal Build Error incomplete Could not load file or assembly 'Microsoft.VisualStudio.LanguageServices.CSharp, Version=0.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

I get the same error when I try File->New->Project->Templates->C#->Roslyn->CodeRefactoring->F5

Any idea why this happens?

有帮助吗?

解决方案

You need to install Roslyn into your VS experimental hive. This is listed in the Readme, and the SDK includes an exe to do so.

Correct way to reinstall Roslyn:

  1. Uninstall all the Roslyn extensions
  2. Delete %LocalAppData%\Microsoft\VisualStudio\12.0Roslyn
  3. Using regedit delete HKCU\Software\Microsoft\visualStudio\12.0Roslyn and 12.0Roslyn_Config
  4. Run Install Roslyn Preview into Roslyn Experimental Hive.exe
  5. Run Roslyn End User Preview.vsix
  6. Run Roslyn SDK Project Templates.vsix
  7. Run Roslyn Syntax Visualizer.vsix

For debugging with VisualStudio2013

  • Check the project file entry and use the correct version of your VS instance:
    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == '">12.0</VisualStudioVersion>
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top