我用的三层架构开发的网站,在本地能正常运行,逐个对三层生成也都成功,网站生成也没问题,也发布的是出来个错误
“------ 已启动生成: 项目: ZhongHuanModels, 配置: Debug Any CPU ------
  ZhongHuanModels -> D:\项目\中环光伏\ZhongHuan\ZhongHuanModels\bin\Debug\ZhongHuanModels.dll
------ 已启动生成: 项目: ZhongHuanDAL, 配置: Debug Any CPU ------
  ZhongHuanDAL -> D:\项目\中环光伏\ZhongHuan\ZhongHuanDAL\bin\Debug\ZhongHuanDAL.dll
------ 已启动生成: 项目: ZhongHuanBLL, 配置: Debug Any CPU ------
  ZhongHuanBLL -> D:\项目\中环光伏\ZhongHuan\ZhongHuanBLL\bin\Debug\ZhongHuanBLL.dll
------ 已启动生成: 项目: D:\...\ZhongHuan\, 配置: Debug Any CPU ------
正在预编译网站正在生成目录“/ZhongHuan/App_Code/”。: 发布 (web): 未将对象引用设置到对象的实例。预编译完成
------ 跳过的发布: 项目 D:\...\ZhongHuan\, 配置: Debug Any CPU ------
 
========== 生成: 成功或最新 3 个,失败 1 个,跳过 0 个 ==========
========== 发布: 成功 0 个,失败 0 个,跳过 1 个 ==========”奇怪的是 错误列表里面也没提示行号,现在都不知道哪地方出错了?

解决方案 »

  1.   

    正在验证网站
    正在生成目录“/ZhongHuan/Admin/AdminManage/”。
    正在生成目录“/ZhongHuan/Admin/BossEnter/JavaScript/”。
    正在生成目录“/ZhongHuan/Admin/BossEnter/”。
    正在生成目录“/ZhongHuan/Admin/GuestBook/”。
    正在生成目录“/ZhongHuan/Admin/ImagePreviewd/”。
    正在生成目录“/ZhongHuan/Admin/JobManage/”。
    正在生成目录“/ZhongHuan/Admin/LinkManage/”。
    正在生成目录“/ZhongHuan/Admin/MaterialManage/”。
    正在生成目录“/ZhongHuan/Admin/MemberColumn/”。
    正在生成目录“/ZhongHuan/Admin/NewsColumn/”。
    正在生成目录“/ZhongHuan/Admin/PageColumn/”。
    正在生成目录“/ZhongHuan/Admin/ProductColumn/”。
    正在生成目录“/ZhongHuan/Admin/RoleManage/”。
    正在生成目录“/ZhongHuan/Admin/SingleInfoColumn/”。
    正在生成目录“/ZhongHuan/Admin/SysBaseInfo/”。
    正在生成目录“/ZhongHuan/Admin/Traffic/”。
    正在生成目录“/ZhongHuan/Admin/WebMap/”。
    正在生成目录“/ZhongHuan/Admin/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/dialog/common/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/dialog/fck_flash/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/dialog/fck_image/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/dialog/fck_link/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/dialog/fck_select/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/dialog/fck_spellerpages/spellerpages/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/dtd/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/filemanager/browser/default/js/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/js/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/lang/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/plugins/autogrow/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/plugins/bbcode/_sample/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/plugins/bbcode/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/plugins/dragresizetable/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/plugins/placeholder/lang/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/plugins/placeholder/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/plugins/simplecommands/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/plugins/tablecommands/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/skins/default/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/skins/office2003/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/skins/silver/”。
    正在生成目录“/ZhongHuan/fckeditor/”。
    正在生成目录“/ZhongHuan/FileBrowser/”。
    正在生成目录“/ZhongHuan/Inc/”。
    正在生成目录“/ZhongHuan/JavaScript/”。
    正在生成目录“/ZhongHuan/js/”。
    正在生成目录“/ZhongHuan/UserControl/”。
    正在生成目录“/ZhongHuan/”。验证完成
    ========== 生成: 成功或最新 4 个,失败 0 个,跳过 0 个 ==========
      

  2.   

    ------ 已启动生成: 项目: ZhongHuanModels, 配置: Debug Any CPU ------
      ZhongHuanModels -> D:\项目\中环光伏\ZhongHuan\ZhongHuanModels\bin\Debug\ZhongHuanModels.dll
    ------ 已启动生成: 项目: ZhongHuanDAL, 配置: Debug Any CPU ------
      ZhongHuanDAL -> D:\项目\中环光伏\ZhongHuan\ZhongHuanDAL\bin\Debug\ZhongHuanDAL.dll
    ------ 已启动生成: 项目: ZhongHuanBLL, 配置: Debug Any CPU ------
      ZhongHuanBLL -> D:\项目\中环光伏\ZhongHuan\ZhongHuanBLL\bin\Debug\ZhongHuanBLL.dll
    ------ 已启动生成: 项目: D:\...\ZhongHuan\, 配置: Debug Any CPU ------
    正在预编译网站正在生成目录“/ZhongHuan/App_Code/”。
    正在生成目录“/ZhongHuan/Admin/AdminManage/”。
    正在生成目录“/ZhongHuan/UserControl/”。
    正在生成目录“/ZhongHuan/Admin/BossEnter/JavaScript/”。
    正在生成目录“/ZhongHuan/Admin/BossEnter/”。
    正在生成目录“/ZhongHuan/Admin/GuestBook/”。
    正在生成目录“/ZhongHuan/Admin/ImagePreviewd/”。
    正在生成目录“/ZhongHuan/Admin/JobManage/”。
    正在生成目录“/ZhongHuan/Admin/LinkManage/”。
    正在生成目录“/ZhongHuan/Admin/MaterialManage/”。
    正在生成目录“/ZhongHuan/Admin/MemberColumn/”。
    正在生成目录“/ZhongHuan/Admin/NewsColumn/”。
    正在生成目录“/ZhongHuan/Admin/PageColumn/”。
    正在生成目录“/ZhongHuan/Admin/ProductColumn/”。
    正在生成目录“/ZhongHuan/Admin/RoleManage/”。
    正在生成目录“/ZhongHuan/Admin/SingleInfoColumn/”。
    正在生成目录“/ZhongHuan/Admin/SysBaseInfo/”。
    正在生成目录“/ZhongHuan/Admin/Traffic/”。
    正在生成目录“/ZhongHuan/Admin/WebMap/”。
    正在生成目录“/ZhongHuan/Admin/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/dialog/common/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/dialog/fck_flash/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/dialog/fck_image/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/dialog/fck_link/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/dialog/fck_select/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/dialog/fck_spellerpages/spellerpages/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/dtd/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/filemanager/browser/default/js/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/filemanager/connectors/aspx/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/js/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/lang/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/plugins/autogrow/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/plugins/bbcode/_sample/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/plugins/bbcode/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/plugins/dragresizetable/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/plugins/placeholder/lang/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/plugins/placeholder/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/plugins/simplecommands/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/plugins/tablecommands/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/skins/default/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/skins/office2003/”。
    正在生成目录“/ZhongHuan/fckeditor/editor/skins/silver/”。
    正在生成目录“/ZhongHuan/fckeditor/”。
    正在生成目录“/ZhongHuan/FileBrowser/”。
    正在生成目录“/ZhongHuan/Inc/”。
    正在生成目录“/ZhongHuan/JavaScript/”。
    正在生成目录“/ZhongHuan/js/”。
    正在生成目录“/ZhongHuan/”。: 发布 (web): 未将对象引用设置到对象的实例。预编译完成
    ------ 跳过的发布: 项目 D:\...\ZhongHuan\, 配置: Debug Any CPU ------
     
    ========== 生成: 成功或最新 3 个,失败 1 个,跳过 0 个 ==========
    ========== 发布: 成功 0 个,失败 0 个,跳过 1 个 ==========就这一个错误,主要是在错误列表里面没提示我错误的行号
      

  3.   

    是不是你的app_code中的代码文件是访问不到的啊。
      

  4.   

    看来不是BLL,model,dal的问题应该是web即表面层的问题。看看你的web.config是否正确。
      

  5.   

    看看你的项目哪里是不是成只读的了,或者是你的Bin成只读的了,再看看你发布的是几的网站啊。
      

  6.   

    MLGB,我也碰到这个问题了,按照LZ的方法试了下,居然可以了,谢谢LZ