Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Web Deployment Project & TeamCity

I am trying to build a web deployment project 2010 project for a solution. I have installed the Windows SDK and Web Deployment Project 2010 RTW on the build server, as well as copied over the missing .target files for MSBuild.

When attempting to build the project it spits out the following error

C:\Program Files\MSBuild\Microsoft\WebDeployment\v10.0\Microsoft.WebDeployment.targets(1589, 9): error MSB6004: The specified task executable location "C:\Program Files\MSBuild\Microsoft\WebDeployment\v10.0\aspnet_merge.exe" is invalid.

Unfortunately, searching around Google for results about this error don't reveal anything of much value. Any help to get TeamCity successfully building the web deployment project would be appreciated.

like image 744
Tom Bell Avatar asked Jul 07 '11 13:07

Tom Bell


People also ask

What is web deployment?

What is Web Deploy? Web Deploy is an extensible client-server tool for syncing content and configuration to IIS. Web Deploy is used primarily in two scenarios: Developers use it to sync (aka 'publish') a compiled web applications (ASP . Net, PHP etc) from developer tools (Visual Studio, WebMatrix, etc) to IIS.

How do I deploy a project on my website?

Deploying Project to the environment Once the environment is created, you can deploy Project to the environment from within the Power Platform Admin Center (PPAC). Open the Resources > Dynamics 365 apps page from the left-hand navigation menu. Then, install the Project Service Core package into your environment.

What is project deployment?

In general, deployment refers to moving an object to a place where some action can be performed on it. In the case of software development, deployment means making an application ready for delivery.

What is Microsoft web deployment Tool?

The Microsoft® Web Deployment Tool simplifies the migration, management, and deployment of Internet Information Services (IIS) Web servers, Web applications, and Web sites.


2 Answers

ok your aspnet_merge is being pointed to the wrong place - in my build script i have something that ends up as follows:

<ItemGroup>
    <ASPNETPath Include="F:\Program Files\Microsoft SDKs\Windows\v6.0A\bin" />
</ItemGroup>

<Target Name="ASPNET Merge">
    <AspNetMerge
      ExePath="@(ASPNETPath)"
      ApplicationPath=".\Release"
      SingleAssemblyName="CoreMicrosite"
      />
</Target>

try it and see

like image 97
stack72 Avatar answered Oct 04 '22 02:10

stack72


More suitable solution should be to set TargetFrameworkSDKDirectoryBin property in your .wdproj file. For example:

<TargetFrameworkSDKDirectoryBin>C:\Programmi\Microsoft SDKs\Windows\v7.1\Bin\</TargetFrameworkSDKDirectoryBin>

this setting, used in .dtproj file, override the default setting defined in Microsoft.WebDeployment.targets as you can see here

<Target
  Name="GetAspNetMergePath"
  DependsOnTargets="$(GetAspNetMergePathDependsOn)">
  <PropertyGroup>
      <AspnetMergeName>aspnet_merge.exe</AspnetMergeName>
      <AspnetMergePath>$(MSBuildExtensionsPath)\Microsoft\WebDeployment\v10.0</AspnetMergePath>
      <AspnetMergePath Condition="Exists('$(TargetFrameworkSDKDirectoryBin)$(AspnetMergeName)')">$(TargetFrameworkSDKDirectoryBin)</AspnetMergePath>
  </PropertyGroup>
</Target>

the second AspnetMergePath means that if exists somewhere else a $(TargetFrameworkSDKDirectoryBin) that point to an existing aspnet_merge.exe file, this will be used.

like image 29
Luca Arpaia Avatar answered Oct 04 '22 04:10

Luca Arpaia