【发布时间】:2020-09-16 05:48:34
【问题描述】:
我有一个在VSBuild@1 任务中使用的 pubxml,并且构建工作正常,除了我没有得到我的 .pdb 文件。如何确保 .pdb 文件也包含在我的版本中?
项目发布配置
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Staging2|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<LangVersion>default</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
Pubxml 文件
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>FileSystem</WebPublishMethod>
<PublishProvider>FileSystem</PublishProvider>
<LastUsedBuildConfiguration>Staging2</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>False</LaunchSiteAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<publishUrl>Publish</publishUrl>
<DeleteExistingFiles>True</DeleteExistingFiles>
<TargetFramework>net472</TargetFramework>
<DebugSymbols>True</DebugSymbols>
<DebugType>Full</DebugType>
</PropertyGroup>
</Project>
YAML 构建任务
task: VSBuild@1
inputs:
solution: '**\MyApps\Main.csproj'
msbuildArgs: '/t:build /p:DeployOnBuild=true /p:PublishProfile=publish.pubxml /p:OutputPath=$(build.artifactStagingDirectory)\MainPublish\'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
根据我查到的内容,如果您可以设置/Build=full 属性就可以了。那么我的问题是,如果是这样的话,我在哪里添加它?
【问题讨论】:
-
您是否尝试将以下内容添加到
msbuildArgs:/p:DebugType=full? -
@YanSklyarenko 我在上面... :)
-
@YanSklyarenko 成功了 ;) 您能否将其作为答案发布,以便我接受它,您将获得声誉提升:D
标签: build azure-devops azure-pipelines pdb-files buildconfiguration