代码之家  ›  专栏  ›  技术社区  ›  vtortola

ASP.NET应用程序部署混乱

  •  2
  • vtortola  · 技术社区  · 15 年前

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

    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文件 文件到 ./ 但还是没有 工作。
    • ./ /箱子 ,但不同的是

    尝试查找 文件在?

    为什么我有一个 如果我在发布时选择了“发布”?

    1 回复  |  直到 15 年前
        1
  •  1
  •   MADCookie    15 年前

    下次发布时,打开设置为生成输出的输出窗口。这将充满了Visual Studio输出的指令,向您展示它所做的一切。当我缺少一个DLL引用时,我在那里找到了Visual Studio试图查找丢失文件的语句。它记录了所有它想找到文件的地方。

    推荐文章