Visual studio 2010 是否在Global.asax中使用程序集引用?

Visual studio 2010 是否在Global.asax中使用程序集引用?,visual-studio-2010,visual-studio-2012,global-asax,assembly-resolution,Visual Studio 2010,Visual Studio 2012,Global Asax,Assembly Resolution,我有一个应用程序,我们的海外开发者正在尝试更新。这段代码一年前就没有问题了。现在,当他们签出代码并尝试构建代码时,在Global.asax中会出现一个引用错误: Error 1 The type or namespace name 'HartSourceLib' could not be found (are you missing a using directive or an assembly reference?) c:\Users\rs02130\Desktop\bip\

我有一个应用程序,我们的海外开发者正在尝试更新。这段代码一年前就没有问题了。现在,当他们签出代码并尝试构建代码时,在Global.asax中会出现一个引用错误:

Error   1   The type or namespace name 'HartSourceLib' could not be   found (are you missing a using directive or an assembly reference?)   c:\Users\rs02130\Desktop\bip\BIProductionSupport\Global.asax    24  9   BIProductionSupport
项目引用中有一个引用指向HartSourceLib DLL。DLL位于引用位置,并且与原始生成中使用的DLL相同。我不熟悉Global.asax中外部引用的使用。我们尝试过使用,但没有一个解决了这个问题。以下是Global.asax的示例:

Error   1   The type or namespace name 'HartSourceLib' could not be   found (are you missing a using directive or an assembly reference?)   c:\Users\rs02130\Desktop\bip\BIProductionSupport\Global.asax    24  9   BIProductionSupport

我们在Global.asax中遗漏了什么吗?如果不是,是什么导致了参考问题


注意:他们正在使用VS2010和3.5框架。我将解决方案转换为VS2012和4.5框架。两者都不起作用。

请确保名称空间正确

然后加上

<%@ Import Namespace="HartSourceLib" %> at the start of the code below the 
<%@ Application Language="C#" %>
在下面代码的开头
之后,确保web.config文件中存在HartSourceLib,然后在文件属性中将HartSourceLib文件标记为要复制到输出文件夹

最后清理您的项目并构建


我希望这能解决您的问题。

我们店里的人最终发现了这一点,但那是在我离开一天后,所以我无法更新条目。奇怪的是,它成功地构建了数年(字面上)和VS2010/.NET3.5中的最后两年。突然,我们不得不添加Import Namespace语句。古怪的但这是固定的。谢谢