Azure DevOps Build - publish doesn't create .compiled files in bin folder on publish

岁酱吖の 提交于 2020-07-21 01:24:09

问题


I have a web project I am building and creating a published package from Azure-DevOps Build pipeline.

I am running with the issue that not getting .compile files in bin folder while publishing. when I am publishing from the direct build machine's VS 2015(on which azure-DevOps builds are also running) I am getting all .compile files.

My .pubxml file

<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <WebPublishMethod>FileSystem</WebPublishMethod>
    <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
    <LastUsedPlatform>Any CPU</LastUsedPlatform>
    <SiteUrlToLaunchAfterPublish />
    <LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
    <PrecompileBeforePublish>True</PrecompileBeforePublish>
    <EnableUpdateable>False</EnableUpdateable>
    <DebugSymbols>True</DebugSymbols>
    <WDPMergeOption>CreateSeparateAssembly</WDPMergeOption>
    <UseFixedNames>True</UseFixedNames>
    <ExcludeApp_Data>False</ExcludeApp_Data>
    <publishUrl>E:\DevOps\agent\vsts-agent-win-x64-2.136.1\QAWeb_Artifacts</publishUrl>
    <DeleteExistingFiles>True</DeleteExistingFiles>
  </PropertyGroup>
</Project>

Task configuration in Azure-DevOps pipeline

I found the same issue here - https://forums.asp.net/t/1984856.aspx but not answered.

Please Suggest what I am missing when I build and publish my website from azure-DevOps.


回答1:


My Manager found an answer !!

Solution - Whenever we choose task 'Visual Studio Build' it is not different from 'MSBuild build' task except MSBuild version which we want to run. So if I give /p:PublishProfile=/my/publishProfile/PUBXML as an argument it won't work. Rather than all parameter should be in 'MSbuild arguments' Section directly of build task.

Now My Visual Studio task configuration look like,

This works great!



来源:https://stackoverflow.com/questions/53931787/azure-devops-build-publish-doesnt-create-compiled-files-in-bin-folder-on-pub

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!