Global.asax can't find code-behind class

前端 未结 3 1337
一生所求
一生所求 2021-01-13 11:06

I keep getting this error when I try to run a web app that I have inherited. It was written in 2010 for C# 3.5 and uses Mvc 2. I have installed the necessary libraries howev

相关标签:
3条回答
  • 2021-01-13 11:50

    My problem was that I had accidentally created a web site instead of a web application. Once I recreated the project it worked fine.

    0 讨论(0)
  • 2021-01-13 11:54

    Add Codebehind="Global.asax.cs" to the Markup file (Global.asax):

    From:

    <%@ Application Inherits="AdminConsole.MvcApplication" Language="C#" %>
    

    To:

    <%@ Application Codebehind="Global.asax.cs"
                    Inherits="AdminConsole.MvcApplication" Language="C#" %>
    
    0 讨论(0)
  • 2021-01-13 12:00

    Verify that the project is configured to place your DLLs into the /bin folder and not in /bin/x86/Debug/ (or similar).

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