7

MSBuild を使用して、Asp.Net MVC 3、.Net 4 アプリケーションをパッケージ化して公開しています。MVC 1.0、.Net 3.5 アプリケーションでは、これを既に成功させています。

IncludeIisSettings=true.proj ファイルにIIS 設定 ( ) を含めるたびに、次のビルド エラーが発生します。

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(2046, 5): エラー MSB4044: "EscapeTextForRegularExpressions" タスクに必要な値が指定されていませんパラメータ「テキスト」。

4

4 に答える 4

12

I've had the same issue on my build server.

The package would build perfectly on my development machine but would fail with the exact same error you have on my build server. For me the problem was caused by the fact that on my build machine, the application is not registered with IIS.

The problem started when I enabled local testing in IIS Express in the project and in some indirect way that enables the IncludeIisSettings=true setting you mentioned. This causes the web deployment pipeline to query IIS for the site's details. Since the build server did not have IIS 7 or IIS Express installed it could not get those settings. This ultimately leads to the error above because the parameter passed to the EscapeTextForRegularExpressions task is empty.

My solution was to set IncludeIisSettings to False in the applications .wpp.targets file (see here for an example .wpp.targets file). If you specify the settings for IIS explicitly, that should not be a problem.

I was also able to fix the build by registering the site with IIS Express using WebMatrix. Running the site in Visual Studio should have the same effect.

于 2012-06-18T08:48:31.550 に答える
1

私が抱えていた問題は、アクセス許可、特にラップトップを切り替えた後の Windows 7 の UAC 設定に関するものでした。

以前の構成を詳しく調べたところ、まだデフォルトの UAC 設定があることに気付きました。変更するには、 に移動しStart > Control Panel > User Accounts > User Accounts > Change User Account Control Settingsます。次に、バーを までドラッグしますNever notify

私が観察したいくつかの追加の症状は、役立つ可能性があります。

msbuild をローカルで実行するとIncludeIisSettings=true、質問と同じエラーが発生しました。

いくつかの欲求不満と間違った方向転換の後、私は管理者であるにもかかわらず、関連する領域で許可エラーが発生した理由を理解できませんでした。たとえばIncludeIisSettings=false、展開ファイルを設定して実行しようとすると、許可エラーを受け取りました。

したがって、UAC 設定を調べて解決策を見つけることにしました。

于 2013-05-31T21:11:49.357 に答える
0

私たちが見つけたソリューションは、IncludeIisSettings=true であり、「"EscapeTextForRegularExpressions" タスクに必要なパラメーター "Text" の値が指定されていません。」なしで正常にビルドされました。エラーは次のとおりです。

  • ビルド サーバーに Visual Studio をインストールします (既に完了しています)。
  • ビルド サーバーに IIS をインストールします。
  • IIS の既定の Web サイトで、https (ポート 443) のバインドを追加し、Visual Studio によってインストールされた証明書 (IIS Express 開発証明書) を使用します。
于 2017-03-17T10:18:38.740 に答える