解决'无法加载类型'错误
本文关键字:类型 错误 加载 解决 | 更新日期: 2023-09-27 18:01:21
我一直在试图修复这个错误数小时,我尝试了一切我可以这样做,没有成功。我对c#还是个新手。我想知道是否有人可以帮助我确定如何开始解决这个错误?
错误信息:
Could not load type 'Inventory1.Global'. W:'admin.fctl.ucf.edu'inventory'Global.asax 1
全球。asax内容:
<%@ Application Codebehind="Global.asax.cs" Inherits="Inventory1.Global" Language="C#"%>
Global.asax.cs内容:
using System;
using System.Collections;
using System.ComponentModel;
using System.Web;
using System.Web.SessionState;
namespace Inventory1
{
/// <summary>
/// Summary description for Global.
/// </summary>
public class Global : System.Web.HttpApplication
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
public Global()
{
InitializeComponent();
}
protected void Application_Start(Object sender, EventArgs e)
{
}
protected void Session_Start(Object sender, EventArgs e)
{
}
protected void Application_BeginRequest(Object sender, EventArgs e)
{
}
protected void Application_EndRequest(Object sender, EventArgs e)
{
}
protected void Application_AuthenticateRequest(Object sender, EventArgs e)
{
}
protected void Application_Error(Object sender, EventArgs e)
{
}
protected void Session_End(Object sender, EventArgs e)
{
}
protected void Application_End(Object sender, EventArgs e)
{
}
#region Web Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
}
#endregion
}
}
这段代码在我的机器上运行。检查以确保Dll存在于/bin目录中。此外,请确保bin和Global。在应用程序的根目录中存在一个ax文件。