我试图发布一个Azure网站 - 我已将其设置为从Bitbucket进行部署,并且当我向主分支推送时它正在构建,但部署随着AspNetMergePath失败错误。
我似乎无法在本地重新创建此问题 - 一切正常。
我已经附上了我的日志,我希望有人可以提供一些指导,我之前没有使用过Azure,而且我已经迷失了......
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
答案 0 :(得分:1)
我在尝试将项目切换到Azure网站上的git部署时遇到了同样的问题。以前我一直在使用Visual Studio手动发布网站。
在项目的csproj文件中,我改变了:
<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>
对此:
<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>
我猜测只需将UseMerge
更改为false
也可以。