I don\'t know what\'s wrong with my machine, but it\'s a while that I\'m getting the following strange error from ASP.NET (for all my applications).
Compilat
I had to kill multiple instances of MSBuild.exe hanging in process explorer.
Then the website runs OK.
In IIS Manager, in the advanced settings of the Application Pool, make sure "Process Model → Load User Profile" is set to "True". In my case it worked.
If you get the error "An error occurred during the compilation of a resource required to service this request. Compiler Error Message: The compiler failed with error code 255."
Try to terminate the processes "VBCSCompiler.exe". VBCSCompiler.exe can also be the problem if your application can not build due to the fact that some packages can not be transferred to the bin folder.
Cause: I have noticed that when I clean my project or clean one of the dependent projects and then hit refresh a few times on the page showing the site then it causes this error. It seems like it tries to load/run a broken/missing DLL project somehow.
Rename the project’s IIS directory to something different and with new name it loads fine (again providing project is built first OK then run otherwise it causes the same issue)
The version of the Microsoft.Net.Compilers (3.0) used in my project was incompatible with the version of .NET installed on the server.
I downgraded the version to 2.1 and everything work fine now.
I guess it's related to the different versions of .Net framework (guessing .NET Core) installed on the server.
Delete C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\