Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Visual Studio 2008 Web Deployment projects - getting an error finding aspnet_merge.exe

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

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

Here is the source of the error (from the web deployment targets file):

<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)"
      />

What is the solution to this problem?

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

like image 871
Adam Avatar asked Dec 22 '22 14:12

Adam


1 Answers

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.

The place to get this is an installation of the Windows 2008 SDK (latest download). Windows 7/Windows 2008 R2 SDK: here

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:

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

NOTE: You will need to modify to point to where you installed the SDK if not in the default location.

Now VS2008 will know where to find aspnet_merge.exe.

like image 195
Adam Avatar answered Feb 01 '23 22:02

Adam