1

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

progrAmmar
  • 2,606
  • 4
  • 29
  • 58
  • 1
    Check this out http://stackoverflow.com/questions/8058832/system-missingmethodexception-method-not-found – Mindless Mar 16 '17 at 03:05

2 Answers2

4

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.

progrAmmar
  • 2,606
  • 4
  • 29
  • 58
1

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.

  • While you're (likely) correct, SO is fairly strict about "Questions," "Answers," and "Comments" as a community. This post is more of a comment than an answer. When you have the rep, just post this as a comment :) – wahwahwah Mar 16 '17 at 03:16
  • As I have pointed out in my question. I have already run the application before on the same live server. The only difference is that I had a new Area created and some new controllers. I didn't change the version or anything on the original one – progrAmmar Mar 16 '17 at 03:52
  • Are you sure when you updated the new content, there are no duplicate dlls from old file in the server? – Mindless Mar 16 '17 at 04:27
  • The dlls weren't duplicate there. – progrAmmar Mar 16 '17 at 06:10