2

I'm trying to publish an Azure Web Site - I've set it up to deploy from Bitbucket and it is building when I do a push to the master branch, but the deploy then fails with an AspNetMergePath error.

I can't seem to recreate this issue locally - everything is working fine.

I've attached my log and I'm hoping someone can offer some guidance, I've not used Azure before and am getting quite lost...

Command: D:\home\site\deployments\tools\deploy.cmd
Handling .NET Web Application deployment.
All packages listed in packages.config are already installed.
  All packages listed in packages.config are already installed.
  All packages listed in packages.config are already installed.
  Ministry.Ministryweb -> D:\home\site\repository\Ministry.Ministryweb\bin\Ministry.Ministryweb.dll
  Ministryweb -> D:\home\site\repository\Ministryweb\bin\Ministryweb.dll
  Transformed Web.config using D:\home\site\repository\Ministryweb\Web.Release.config into obj\Release\TransformWebConfig\transformed\Web.config.
  Copying all files to temporary location below for package/publish:
  obj\Release\AspnetCompileMerge\Source.
D:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Transform\Microsoft.Web.Publishing.AspNetCompileMerge.targets(132,5): error : Can't find the valid AspnetMergePath [D:\home\site\repository\Ministryweb\Ministryweb.csproj]
Failed exitCode=1, command="D:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" "D:\home\site\repository\Ministryweb\Ministryweb.csproj" /nologo /verbosity:m /t:Build /t:pipelinePreDeployCopyAllFilesToOneFolder /p:_PackageTempDir="C:\DWASFiles\Sites\ministryweb\Temp\fbf0f455-7bbc-444c-851a-7970992a2473";AutoParameterizationWebConfigConnectionStrings=false;Configuration=Release /p:SolutionDir="D:\home\site\repository\.\\"
An error has occurred during web site deployment.
Handling .NET Web Application deployment.
All packages listed in packages.config are already installed.
  All packages listed in packages.config are already installed.
  All packages listed in packages.config are already installed.
  Ministry.Ministryweb -> D:\home\site\repository\Ministry.Ministryweb\bin\Ministry.Ministryweb.dll
  Ministryweb -> D:\home\site\repository\Ministryweb\bin\Ministryweb.dll
  Transformed Web.config using D:\home\site\repository\Ministryweb\Web.Release.config into obj\Release\TransformWebConfig\transformed\Web.config.
  Copying all files to temporary location below for package/publish:
  obj\Release\AspnetCompileMerge\Source.
D:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Transform\Microsoft.Web.Publishing.AspNetCompileMerge.targets(132,5): error : Can't find the valid AspnetMergePath [D:\home\site\repository\Ministryweb\Ministryweb.csproj]
Failed exitCode=1, command="D:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" "D:\home\site\repository\Ministryweb\Ministryweb.csproj" /nologo /verbosity:m /t:Build /t:pipelinePreDeployCopyAllFilesToOneFolder /p:_PackageTempDir="C:\DWASFiles\Sites\ministryweb\Temp\fbf0f455-7bbc-444c-851a-7970992a2473";AutoParameterizationWebConfigConnectionStrings=false;Configuration=Release /p:SolutionDir="D:\home\site\repository\.\\"
An error has occurred during web site deployment.
D:\Program Files (x86)\SiteExtensions\Kudu\1.26.30307.679\bin\scripts\starter.cmd D:\home\site\deployments\tools\deploy.cmd

1 Answer 1

1

I just ran into the same issue when trying to switch a project to git deployment on Azure web sites. Previously I had been manually publishing the site from with Visual Studio.

In the project's csproj file I changed:

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
  <DebugType>pdbonly</DebugType>
  <Optimize>true</Optimize>
  <OutputPath>bin\</OutputPath>
  <DefineConstants>TRACE</DefineConstants>
  <ErrorReport>prompt</ErrorReport>
  <WarningLevel>4</WarningLevel>
  <PrecompileBeforePublish>true</PrecompileBeforePublish>
  <UseMerge>true</UseMerge>
  <WDPMergeOption>MergeAllOutputsToASingleAssembly</WDPMergeOption>
  <SingleAssemblyName>Hvac.Web.Merged</SingleAssemblyName>
  <DeleteAppCodeCompiledFiles>true</DeleteAppCodeCompiledFiles>
  <ContentAssemblyName>
  </ContentAssemblyName>
  <EnableUpdateable>true</EnableUpdateable>
</PropertyGroup>

To this:

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
  <DebugType>pdbonly</DebugType>
  <Optimize>true</Optimize>
  <OutputPath>bin\</OutputPath>
  <DefineConstants>TRACE</DefineConstants>
  <ErrorReport>prompt</ErrorReport>
  <WarningLevel>4</WarningLevel>
</PropertyGroup>

I'm guesstimating that just changing UseMerge to false would also work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.