Azure DevOps构建-发布不会在发布时的bin文件夹中创建.compiled文件 [英] Azure DevOps Build - publish doesn't create .compiled files in bin folder on publish

查看:200
本文介绍了Azure DevOps构建-发布不会在发布时的bin文件夹中创建.compiled文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Web项目正在构建,并通过Azure-DevOps Build管道创建一个已发布的程序包.

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

我遇到的问题是发布时没有在bin文件夹中获取.compile文件.当我从直接构建计算机的VS 2015(还正在运行azure-DevOps构建的)发布时,我正在获取所有.compile文件.

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.

我的.pubxml文件

<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>

Azure-DevOps管道中的任务配置

我在这里发现了相同的问题- https://forums.asp.net/t/1984856.aspx ,但未回答.

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

请提出我从azure-DevOps构建和发布网站时所缺少的信息.

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

推荐答案

我的经理找到了答案!

My Manager found an answer !!

解决方案- 每当我们选择任务"Visual Studio Build"时,它都与"MSBuild build"任务没有区别,除了我们要运行的MSBuild版本.因此,如果我给/p:PublishProfile=/my/publishProfile/PUBXML作为参数,它将不起作用.而不是所有参数都应该直接在构建任务的"MSbuild参数"部分中.

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.

现在,我的Visual Studio任务配置如下

这很好用!

这篇关于Azure DevOps构建-发布不会在发布时的bin文件夹中创建.compiled文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆