Resolve: The CodeDom provider type “Microsoft.CodeDom. Providers.DotNetCompilerPlatform. CSharpCodeProvider, Microsoft.CodeDom. Providers.DotNetCompilerPlatform , Version=, Culture=neutral … could not be located.

Recently I change my development environment and come across the following issue while browsing the website on localhost

The CodeDom provider type “Microsoft. CodeDom. Providers. DotNetCompilerPlatform. CSharpCodeProvider, Microsoft. CodeDom. Providers. DotNetCompilerPlatform, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35” could not be located.

When I investigate this issue it turns out the project has Roslyn reference which the new environment’s IIS does not support.


The solution is very simple, If you reinstall the DotNetCompilerPlatform Nuget package it will resolve the issue.

Update-Package Microsoft.CodeDom.Providers.DotNetCompilerPlatform -r

About the author

Naveed Ul-Haq

I am a UK based technical architect. I love working with .NET based CMS, eCommerce solutions, .NET Core, DevOps, and Cloud computing. I am a Certified Episerver CMS developer, MCSD (Microsoft Certified Solution Developer) and MCP in Azure application development. I spend my free time with my family and reading books. You can contact me on [email protected]

View all posts

Leave a Reply

Your email address will not be published.