1

Visual Studio で Publish コマンドを使用して、IIS サーバーに Web アプリケーションをデプロイします。非常に便利ですが、次のようないくつかの問題があります。

  • Crystal Report ファイル (*.rpt) ファイルは展開しません。
  • web.config ファイルを展開し、サーバー固有の設定を上書きします。

Publish コマンドの機能をカスタマイズする方法はありますか?

ありがとう

4

2 に答える 2

4

Web アプリケーションを発行するとき、Visual Studio はプロジェクト内の各ファイルに設定された「ビルド アクション」を尊重します。ファイルに対して適切なアクションを選択していることを確認してください。オプションは次のとおりです。

なし- ファイルはプロジェクト出力グループに含まれず、ビルド プロセスでコンパイルされません。例として、Readme ファイルなどのドキュメントを含むテキスト ファイルがあります。

コンパイル- ファイルはビルド出力にコンパイルされます。この設定は、コード ファイルに使用されます。

Content - The file is not compiled, but is included in the Content output group. For example, this setting is the default value for an .htm or other kind of Web file.

Embedded Resource - This file is embedded in the main project build output as a DLL or executable. It is typically used for resource files.

In this particular case, the .rpt files should probably be set to Content and the web.config should be set to None. The build action for a file can be changed in the property window when the file is selected in the solution explorer.

于 2010-02-17T13:48:26.130 に答える