visual-studio-2015 - Azure DevOps Build - 发布时不会在 bin 文件夹中创建 .compiled 文件

标签 visual-studio-2015 azure-devops web-deployment precompile pre-compilation

我有一个 Web 项目,我正在构建并从 Azure-DevOps 构建管道创建一个已发布的包。

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

我的 .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 管道中的任务配置

enter image description here

我在这里发现了同样的问题 - https://forums.asp.net/t/1984856.aspx但没有回答。

当我从 azure-DevOps 构建和发布我的网站时,请提出我遗漏的建议。

最佳答案

我的经理找到了答案!!

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

现在我的 Visual Studio 任务配置看起来像 ,
enter image description here

这很好用!

关于visual-studio-2015 - Azure DevOps Build - 发布时不会在 bin 文件夹中创建 .compiled 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53931787/

相关文章:

java - 如何使用免费软件对Java Web应用程序进行连续部署

c# - azure webapp 部署后获取站点正在构建消息

git - 如何使用 Azure DevOps REST Api 从 Git 存储库下载分支中的文件?

javascript - 如何在不刷新的情况下加载新内容到DIV

.net - 如何在wpf中添加.net图表组件

android - Visual Studio Android 模拟器没有互联网连接

javascript - 使用 Apache Cordova for Visual Studio 进行身份验证

visual-studio - Visual Studio 2015 完全离线分发

azure-devops - 在 VSTS Wiki 中嵌入 gif

Azure DevOps 需要构建成功才能完成拉取请求