Could not load type 'XXX.Global'

后端 未结 18 1714
萌比男神i
萌比男神i 2020-12-01 07:06

Migrating a project from ASP.NET 1.1 to ASP.NET 2.0 and I keep hitting this error.

I don\'t actually need Global because I am not adding anything to it, but after I

相关标签:
18条回答
  • 2020-12-01 07:54

    There are a few things you can try with this, seems to happen alot and the solution varies for everyone it seems.

    • If you are still using the IIS virtual directory make sure its pointed to the correct directory and also check the ASP.NET version it is set to, make sure it is set to ASP.NET 2.0.

    • Clear out your bin/debug/obj all of them. Do a Clean solution and then a Build Solution.

    • Check your project file in a text editor and make sure where its looking for the global file is correct, sometimes it doesnt change the directory.

    • Remove the global from the solution and add it back after saving and closing. make sure all the script tags in the ASPX file point to the correct one after.

    • You can try running the Convert to Web Application tool, that redoes all of the code and project files.

    • IIS Express is using the wrong root directory (see answer in VS 2012 launching app based on wrong path)

    Make sure you close VS after you try them.

    Those are some things I know to try. Hope one of them works for you.

    0 讨论(0)
  • 2020-12-01 07:55

    Ensure compiled dll of your project placed in proper bin folder.

    In my case, when i have changed the compiled directory of our subproject to bin folder of our main project, it worked.

    0 讨论(0)
  • 2020-12-01 07:56

    Had this error in my case I was renaming the application. I changed the name of the Project and the name of the class but neglected to change the "Assembly Name" or "Root namespace" in the "My Project" or project properties.

    0 讨论(0)
  • 2020-12-01 07:57

    Deleting the existing global.asax file and adding a new one, clears out this error. This has worked for me many times.

    0 讨论(0)
  • 2020-12-01 08:00

    Removing Language="c#" in global.asax file resolved the issue for me.

    0 讨论(0)
  • 2020-12-01 08:00

    Deletin obj, bin folders and rebuilding fixed my issue

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