Error: «Could not load type MvcApplication»

后端 未结 30 1462
心在旅途
心在旅途 2020-11-28 02:18

I am getting the error

Could not load type MvcApplication

when I try to run my website.

How to correct it?

相关标签:
30条回答
  • 2020-11-28 02:56

    This could happen very often if you change your namespace. Return the name of your namespace,just like it used to be, and that should make it work!

    0 讨论(0)
  • 2020-11-28 02:57

    I get this problem everytime i save a file that gets dynamically compiled (ascx, aspx etc). I wait about 8-10 seconds then it goes away. It's hellishly annoying.

    I thought it was perhaps an IIS Express problem so I tried in the inbuilt dev server and am still receiving it after saving a file. I'm running an MVC app, i'm also using T4MVC, maybe that is a factor...

    0 讨论(0)
  • 2020-11-28 02:57

    I had this error again and none of the above worked for me. I had to remove the following node in .csproj file: <VisualStudio>....</VisualStudio>. Reloaded VS and it worked.

    FYI, VS was able to recreate the node and then I recreated the website in IIS (through VS) and it worked perfectly.

    Hopefully this will help someone.

    0 讨论(0)
  • 2020-11-28 02:57

    I got this error because my version control had gotten set to ignore my bin folder. Very stupid, but maybe someone else will benefit.

    0 讨论(0)
  • 2020-11-28 02:57

    I ran into this very problem and I see there all kinds of answers but nothing has been accepted. I after a little bit discovered that simply building the website before trying to run solved my problem.

    0 讨论(0)
  • 2020-11-28 02:58

    I have fallen into this. I have read and tested all the possible solutions that were given before. Checking build path, build, rebuild, clean, restarting IIS and VS2015, reinstall all nuget packages, compiling them one by one, etc,...

    I suddenly remembered that VS keeps some ASP temporary files in system folders... I think I should give it a try, after all, that could get no worse. So I emptied:

    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files
    C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files
    

    And all is working again... Weird that this problem has such different possible solutions...

    0 讨论(0)
提交回复
热议问题