2

Webアプリケーションが少し混乱しています。私は開発環境で作業していますが、今は自分のコンピューターにある別のフォルダーに公開しようとしているので、同僚の1人が気にせずに試すことができます。そこで、「Visual Studio」の「公開」に行き、新しい「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 ファイルをにコピーしようとしまし./たが、それでも機能しません。
  • フォルダcssはとに表示されます././bin、内容は異なります。

.dllASP.NETはどこでファイルを見つけようとしていますか?

./bin/x86/Debug公開時に「リリース」を選択したのになぜあるのですか?

敬具。

4

1 に答える 1

1

次回公開するときは、ビルド出力に設定された出力ウィンドウを開きます。これは、VisualStudioが実行していることをすべて表示するために出力する命令でいっぱいになります。DLL参照が欠落していると、VisualStudioが欠落しているファイルを見つけようとしていたステートメントがそこに見つかりました。それは、ファイルを見つけるために探したすべての場所を記録しました。

于 2010-11-01T15:50:31.273 に答える