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, Founder & Technology Evangelist. I'm Optimizely MVP & Optimizely SME on Content Cloud and Commerce Cloud. I love working on .NET-based CMS, eCommerce solutions, .NET Core, DevOps, and Cloud computing. I'm also a Certified Optimizely Content Cloud Developer, Certified Optimizely Commerce Cloud developer, Optimizely B2B Commerce developer and Microsoft Certified Professional in Azure application development. I spend my free time with my family and reading books. You can contact me at

View all posts

Leave a Reply

Your email address will not be published. Required fields are marked *