4

最近、VS2005 Web デプロイメント プロジェクトを VS2008 にアップグレードしましたが、ビルド時に次のエラーが発生しました。

The specified task executable location "bin\aspnet_merge.exe" is invalid.

エラーの原因は次のとおりです (Web 配置ターゲット ファイルから)。

<Target Name="AspNetMerge" Condition="'$(UseMerge)' == 'true'" DependsOnTargets="$(MergeDependsOn)">
    <AspNetMerge
      ExePath="$(FrameworkSDKDir)bin"
      ApplicationPath="$(TempBuildDir)"
      KeyFile="$(_FullKeyFile)"
      DelaySign="$(DelaySign)"
      Prefix="$(AssemblyPrefixName)"
      SingleAssemblyName="$(SingleAssemblyName)"
      Debug="$(DebugSymbols)"
      Nologo="$(NoLogo)"
      ContentAssemblyName="$(ContentAssemblyName)"
      ErrorStack="$(ErrorStack)"
      RemoveCompiledFiles="$(DeleteAppCodeCompiledFiles)"
      CopyAttributes="$(CopyAssemblyAttributes)"
      AssemblyInfo="$(AssemblyInfoDll)"
      MergeXmlDocs="$(MergeXmlDocs)"
      ErrorLogFile="$(MergeErrorLogFile)"
      />

この問題の解決策は何ですか?

注 - VS2008 で Web デプロイメント プロジェクトをゼロから作成したところ、同じエラーが発生しました。

4

2 に答える 2

8

どうやら、aspnet_merge.exe (および他のすべての SDK ツール) は、Visual Studio 2008 にパッケージ化されていません。Visual Studio 2005 は、これらのツールをインストールの一部としてパッケージ化しました。

これを取得する場所は、Windows 2008 SDK (最新のダウンロード) のインストールです。Windows 7/Windows 2008 R2 SDK:こちら

解決策は、Windows SDK をインストールし、IDE を起動する前に FrameworkSDKDir を環境変数として設定することです。この変数を設定するバッチ コマンド:

SET FrameworkSDKDir="C:\Program Files\Microsoft SDKs\Windows\v6.1"

注: デフォルトの場所にない場合は、SDK をインストールした場所を指すように変更する必要があります。

これで、VS2008 は aspnet_merge.exe の場所を認識します。

于 2008-08-26T18:43:11.183 に答える
3

I just ran into this same problem trying to use MSBuild to build my web application on a server. I downloaded the "web" version of the SDK because the setup is only 500KB and it prompts you for which components to install and only downloads and installs the ones you choose. I unchecked everything except for ".NET Development Tools". It then downloaded and installed about 250MB worth of stuff, including aspnet_merge.exe and sgen.exe

You can download the winsdk_web.exe setup for Win 7 and .NET 3.5 SP1 here.

于 2010-01-05T20:04:12.187 に答える