现在的位置: 首页 > 综合 > 正文

Could not load file or assembly ‘HDY.BLL’ or one of its dependencies. 系统找不到指定的文件。

2012年02月01日 ⁄ 综合 ⁄ 共 1302字 ⁄ 字号 评论关闭

错误提示:

模仿petshop 4,我的程序是这样的,有

project            class              作用

=================================

DBUtility------SQLhelper.cs (主要是sql的基本操作)

Model---------UserInfo.cs  (用户的基本信息)

IDAL-----------IUser.cs       (用户操作--添加新用户、修改用户信息、等---接口)

DAL------------User.cs        (实现IUser的操作)

DALFactory---DataAccess.cs(工厂类创建User类)

IBLL------------IUser.cs      (和IDAL中的IUser差不多)

BLL-------------User.cs        (和DAL中的User差不多,功能更具体)

BLLFactory----DataAccess.cs(工厂类和DALFactory中DataAccess差不多)

在default.aspx.cs中利用BLLFactory.DataAccess.CreateUser创建一个类出现错误:

================================================================

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'HDY.BLL' or one of its dependencies. 系统找不到指定的文件。

Source Error:

Source File: D:\华东院网站\HDY\BLLFactory\DataAccess.cs    Line: 22

Assembly Load Trace: The following information can be helpful to determine why the assembly 'HDY.BLL' could not be loaded.

Stack Trace:


Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210

===================================================================

问题在于:
DALFactory中的DataAccess类中反射应用的HDY.DAL应改为DAL,因为在web/bin中的dll为DAL.dll。
BLLFactory中的也一样。

抱歉!评论已关闭.