<p>I recently upgraded a VS2005 web deployment project to VS2008 - and now I get the following error when building:</p>

<pre><code>The specified task executable location "bin\aspnet_merge.exe" is invalid.
</code></pre>

<p>Here is the source of the error (from the web deployment targets file):</p>

<pre><code>&lt;Target Name="AspNetMerge" Condition="'$(UseMerge)' == 'true'" DependsOnTargets="$(MergeDependsOn)"&gt;
    &lt;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)"
      /&gt;
</code></pre>

<p>What is the solution to this problem?</p>

<p>Note - I also created a web deployment project from scratch in VS2008 and got the same error.</p>

[{'answer_id': 28822, 'author': 'Adam', 'author_id': 1341, 'author_profile': 'https://Stackoverflow.com/users/1341', 'pm_score': 4, 'selected': True, 'text': '<p>Apparently aspnet_merge.exe (and all the other SDK tools) are NOT packaged in Visual Studio 2008.  Visual Studio 2005 packaged these tools as part of its installation.</p>\n\n<p>The place to get this is an installation of the Windows 2008 SDK (<a href="http://www.microsoft.com/downloads/thankyou.aspx?familyId=e6e1c3df-a74f-4207-8586-711ebe331cdc&amp;displayLang=en" rel="nofollow noreferrer">latest download</a>).\nWindows 7/Windows 2008 R2 SDK: <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=c17ba869-9671-4330-a63e-1fd44e0e2505&amp;displaylang=en" rel="nofollow noreferrer">here</a></p>\n\n<p>The solution is to install the Windows SDK and make sure you set FrameworkSDKDir as an environment variable before starting the IDE.  Batch command to set this variable:</p>\n\n<pre><code>SET FrameworkSDKDir="C:\\Program Files\\Microsoft SDKs\\Windows\\v6.1"\n</code></pre>\n\n<p>NOTE: You will need to modify to point to where you installed the SDK if not in the default location.</p>\n\n<p>Now VS2008 will know where to find aspnet_merge.exe.</p>\n'}, {'answer_id': 2008712, 'author': 'BigJoe714', 'author_id': 37786, 'author_profile': 'https://Stackoverflow.com/users/37786', 'pm_score': 2, 'selected': False, 'text': '<p>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 "<strong>.NET Development Tools</strong>".  It then downloaded and installed about 250MB worth of stuff, including aspnet_merge.exe and sgen.exe</p>\n\n<p>You can download the winsdk_web.exe setup for Win 7 and .NET 3.5 SP1 <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=c17ba869-9671-4330-a63e-1fd44e0e2505&amp;displaylang=en" rel="nofollow noreferrer">here</a>.</p>\n'}]
['https://Stackoverflow.com/questions/28765', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1341/']