Reference from http://support.microsoft.com/kb/306155

当浏览C# .NET aspx 页时出现"Could not load type" 错误

症状:

当浏览一个.aspx页,可能会收到以下错误信息:

Could not load type 'Namespace.Global'.

--

Could not load type 'Namespace.PageName'.  

原因:

这些错是因为aspx 页或Global.asax 包含一些后台代码模块的引用但应用程序却没有编译。

解决方案:

用以下方法编译应用程序:

Use the C# command line compiler (CSC.exe) to run the following command:

csc /t:library /r:System.web.dll /out:mydll.dll myfile.cs

In Microsoft Visual Studio .NET, click Build on the Build menu.

NOTE: Microsoft Visual Basic .NET background compiles the project as soon as it is created. Because Visual C# .NET projects only background parse, you must explicitly build the application.  

 


APPLIES TO

Microsoft ASP.NET 1.0

Microsoft Visual C# .NET 2002 Standard Edition

 

 

相关文章:

  • 2021-08-25
  • 2021-12-04
  • 2022-12-23
  • 2021-05-21
  • 2021-11-10
  • 2021-06-19
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-23
  • 2021-10-13
  • 2021-04-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案