progrAmmar
progrAmmar

Reputation: 2670

ASP.NET MVC application csc.exe The process was terminated due to an unhandled exception

Recently I deployed an ASP.NET MVC application from my local system to the Live server. The application works perfectly on my local system, but for some reason the application crashes on the Live server.

I checked the Event Viewer and found out the following error occurs whenever I access the applicaiton:

Application: csc.exe
Framework version: v4.0.30319
Explanation: The process was terminated due to an unhandled exception.
Exception information: System.MissingMethodException
stack:
    Location Microsoft.CodeAnalysis.CSharp.CommandLine.Program.Main (System.String [])

Now what's weird is that the application I am deploying is just another version of the same application that was running fine previously. I only changed some routing info in the new version and as I said it works fine on my local system. Can you please let me know what's causing this issue. Thanks

Upvotes: 1

Views: 1260

Answers (2)

progrAmmar
progrAmmar

Reputation: 2670

As it turns out, it was due to an UPDATE of a Nuget Package. I got the idea from the link @Mindless shared (thanks for that). So what happened was I upgraded Microsoft.NET.Compilers from 1.3.2 to 2.0.1. And it nearly brought down the entire application. Not sure why because the correct versions were mentioned in the Web.Config files too.

So I downgraded the package back to 1.3.2 and the application works flawlessly.

Upvotes: 4

David G Holzhausen
David G Holzhausen

Reputation: 11

Possibly Entity Framework and .Net versions on your host are not compatible with what you are publishing. More information about your local and production host environments would be helpful.

Upvotes: 1

Related Questions