Could not load file or assembly ‘Microsoft.CodeAnalysis, version= 1.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependenc

As pointed out by @CaptainAmerica the solution is to update the CodeDom assembly from NuGet. One should point out how to do this in Visual Studio.
I found the solution here:

https://www.nuget.org/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform/

Basically, in the Visual Studio menu select:

Tools-> Nuget Package Manager -> Package Manager Console

In the console that appears at the bottom of Visual Studio run this command:

Install-Package Microsoft.CodeDom.Providers.DotNetCompilerPlatform

Leave a Comment