同时追求
a spearate problem
我遇到了一个非常特殊的情况。演示代码为:
public class Global : HttpApplication
{
protected void Application_Start(object sender, EventArgs e)
{
Log("In Application_Start");
SomeClass.SomeProp = ConfigurationManager.AppSettings["PropValue"];
}
protected void Application_BeginRequest(object sender, EventArgs e)
{
Log("In Application_BeginRequest");
try
{
this.Application_Start(null, null);
}
catch ( Exception ex )
{
Log(ex.ToString());
}
Log("At the end of Application_BeginRequest");
}
}
我在日志中得到的是:
In Application_BeginRequest
Could not load file or assembly 'vjslib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
System.IO.FileNotFoundException
at MyRootNamespace.Global.Application_Start(Object sender, EventArgs e)
at MyRootNamespace.Global.Application_BeginRequest(Object sender, EventArgs e) in D:\My Documents\Visual Studio 2008\Projects\SolutionDir\ProjectDir\Global.asax.cs:line 109
At the end of Application_BeginRequest
这对我来说毫无意义。考虑:
-
vjslib
由我的主项目(程序集)引用,其中包括
Global
类。如果无法解析程序集的依赖项,为什么要加载该程序集?
-
SomeClass
在另一个程序集中,该程序集也引用
VJSLB
.
某个班级
是否使用
VJSLB
一些成员确实公开了从中的类派生的类
VJSLB
,但此处使用的属性只是一个普通的旧字符串。
-
为什么堆栈跟踪的第一行没有行号?
依赖项是否按方法解决?我以为
Microsoft doesn't do such things anymore
. 这是怎么回事?