【问题标题】:ASP.NET app deployment messASP.NET 应用程序部署混乱
【发布时间】:2011-05-01 06:29:27
【问题描述】:

我的 Web 应用程序有点乱。我在开发环境中工作,现在我正试图将它发布到我自己计算机中的另一个文件夹中,所以我的一位同事可以尝试它而不会打扰我。于是我去“Visual Studio”中的“Publish”,新建了一个“Web Application”,然后我在那里发布了这个应用程序。

但应用程序不起作用:

Could not load file or assembly 'DkWP2' or one of its dependencies. The system cannot find the file specified. 
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 'DkWP2' or one of its dependencies. The system cannot find the file specified.

我已经查看了文件夹结构和文件,但有点尴尬:

C:\inetpub\wwwroot\DkWP2App>tree /f
Folder PATH listing
Volume serial number is 68B7-8AE3
C:.
│   AppConfig.xml
│   LogoMini.png
│   DkPService.svc
│   Web.config
│
├───App_Data
├───bin
│   │   AppConfig.xml
│   │   DkWP2.dll
│   │   DkWP2.pdb
│   │   DkWP2.XmlSerializers.dll
│   │
│   ├───css
│   │   └───GSA1
│   │       │   jquery-ui-1.8.5.custom.css
│   │       │
│   │       └───Images
│   │               [jQueryUi Pictures]
│   │
│   ├───Images
│   │       [Some of the Main pictures]
│   │
│   └───x86
│       └───Debug
│               AppConfig.xml
│               DkWP2.dll
│               DkWP2.pdb
│
├───css
│   │   [MainCss Files]
│   │
│   ├───Base
│   │       [Base Css Files]
│   │
│   └───GSA1
│       │   jquery-ui-1.8.5.custom.css
│       │
│       └───Images
│           [jQueryUi Pictures]
│
├───Images
│       [Main pictures]
│
├───JavaScript
│       [JS Files]
│
├───Web
└───Web References
  • .dll 文件在 ./bin./bin/x86/Debug有不同 尺寸。
  • 我试图复制.dll 文件到./,但它仍然没有 工作。
  • 文件夹css出现在././bin,但不同 内容。

ASP.NET 试图在哪里定位 .dll 文件?

如果我在发布时选择了“发布”,为什么会有./bin/x86/Debug

亲切的问候。

【问题讨论】:

    标签: .net asp.net asp.net-development-serv


    【解决方案1】:

    下次发布时,打开设置为构建输出的输出窗口。这将充满 Visual Studio 输出的指令,以向您展示它正在执行的所有操作。当我缺少 DLL 引用时,我在其中找到了 Visual Studio 试图查找丢失的文件的语句。它记录了它寻找文件的所有位置。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-08-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多