0
votes

Could not load file or assembly 'Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The module was expected to contain an assembly manifest.

Why do I keep getting this error and how can I fix it?

2
I think the Nuget package Microsoft.CodeDom.Providers.DotNetCompilerPlatform is of wrong version. Try updating the Nuget package.Nitin

2 Answers

2
votes

Try to uninstall and reinstall the package

Uninstall-Package Microsoft.CodeDom.Providers.DotNetCompilerPlatform -force
Install-Package Microsoft.CodeDom.Providers.DotNetCompilerPlatform
1
votes

Error is causing because the Nuget package Microsoft.CodeDom.Providers.DotNetCompilerPlatform (which also contains the CodeAnalysis package) was the wrong version.

create new web application and update Nuget package.