我编了一个console的test来测试dal,bll是否运行正常.
在一个dataaccess里调用这样一句
return (Project.IDAL.INote)Assembly.Load(path).CreateInstance(className);其中path是Project.SQLServerDal
className = Project.SQLServerDal.Note这个是在Project里都有的,也添加了引用,只是运行这句threw exception: InnerException = {"Could not load file or assembly 'Project.SQLServerDal' or one of its dependencies. The system cannot find the file specified.":"Project.SQLServerDal"}不知是为什么?可能是什么问题,谢谢

解决方案 »

  1.   

    路径不正确或dll没有生成成功
      

  2.   

    是path不对吗?
    dll生成成功了啊...在bin\debug 目录下有sqlserverdal.dll啊
    那path应该怎么写....它指的是什么path啊
      

  3.   

    你先试下绝对路径,然后逐步用相对路径来替代。by the way,你的程序很象petshop,欣赏
      

  4.   

    问题解决了,一定要用assembly.loadfile(path),用load就是不行,搞不太清楚,而且用的是绝对路径...所以我用了application.startuppath谢谢