Friday, June 2, 2023

Could not load file Microsoft.CodeAnalysis in VS Code

Possible fix for "... Could not load file or assembly 'Microsoft.CodeAnalysis, Version ..." 

In Visual Studio Code:
0. Switch to Terminal and go to your project folder.
Type:
1. "dotnet add package Microsoft.CodeAnalysis -v X.X.X" // make sure to add appropriate version
2. Press ctrl+shift+p, and type "OmniSharp: Restart OmniSharp"
3  Type (always like this):
   "dotnet restore <enter>"
   "dotnet build <enter>"

No comments:

Post a Comment