Problem
As a developer, you might face an error. It is starting from a predictable error to unknown error. Yesterday I found this error when running ASP.NET MVC. So in this article, I will discuss how to solve the error as shown in the picture.
Causes
The error causes are because you might move your codes from one machine to the other machine. For example, I work on my home by using a notebook and move to work and download the code from version controller to continue coding. There might be a different configuration or version of your visual studio package that makes your code successfully builds but fail to run.
Solution
You have several solutions, just use which one you can use.
Option A.
Rebuild your codes (not just build) and then run your codes
Option B.
Restore Nuget package by selecting restore Nuget Package
Option C.
Open your Nuget package manager console. And type
update-package Microsoft.CodeDom.Providers.DotNetCompilerPlatform -r