Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Commit bce1b7f

Browse files
authored
Enable .pdb files for Release config & add AzDO build script (#8)
Context: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1230070 Context: https://github.com/xamarin/XamarinComponents/blob/af66a9ea9536116b1cdcdd4bcc499f5fcb7232ea/.ci/build.yml Current Microsoft practice requires the presence of symbol files *somewhere* in order to provide useful stack traces in telemetry/etc. The easiest way to have the symbol files is to (1) *create them*, and (2) redistribute them within NuGet packages (so that e.g. the Xamarin.Android SDK can in turn redistribute the `.pdb` files...) Update `LineEditor.csproj` so that `$(DebugType)` is *not* cleared in the Release configuration. This satisfies (1): create the symbol files, so that they *exist*. Update `LineEditor.csproj` to remove the `@(PackageReference)` to `NuGet.Build.Packaging` and the `@(PackageFile)` item group, and instead require the use of the `msbuild /t:Pack` command, which does things *mostly* right. Where `msbuild /t:Pack` falls down is that `LineEditor.pdb` isn't included into the `.nupkg` file, which is something @jonpryor desires, to make it easier to include `LineEditor.pdb` into the Xamarin.Android `.pdb`/`.vsix` installers. To cause `LineEditor.pdb` to be included in the `.nupkg` file, override the `$(AllowedOutputExtensionsInPackageBuildOutputFolder)` property to include `.pdb`. Finally, add `.ci/azure-pipelines.yml`, which is a YAML build script for Azure Pipelines. `azure-pipelines.yml` uses the `.ci/build.yml` file from xamarin/XamarinComponents for signing and publishing.
1 parent 4831e1a commit bce1b7f

File tree

2 files changed

+43
-11
lines changed

2 files changed

+43
-11
lines changed

.ci/azure-pipelines.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: $(Build.SourceBranchName)-$(Build.SourceVersion)-$(Rev:r)
2+
3+
trigger:
4+
- master
5+
- refs/tags/*
6+
7+
pr:
8+
- master
9+
10+
resources:
11+
repositories:
12+
- repository: internal-templates
13+
type: github
14+
name: xamarin/yaml-templates
15+
endpoint: xamarin
16+
- repository: components
17+
type: github
18+
name: xamarin/XamarinComponents
19+
endpoint: xamarin
20+
21+
jobs:
22+
- template: .ci/build.yml@components
23+
parameters:
24+
publishJob: windows
25+
buildType: none
26+
areaPath: 'DevDiv\Xamarin SDK'
27+
linuxImage: '' # skip linux builds
28+
skipValidation: true
29+
steps:
30+
- task: MSBuild@1
31+
displayName: msbuild LineEditor.sln
32+
inputs:
33+
solution: LineEditor.sln
34+
configuration: Release
35+
msbuildArguments: /restore /t:Pack /p:PackageOutputPath=$(Build.SourcesDirectory)/output
36+
37+
- ${{ if eq(variables['System.TeamProject'], 'devdiv') }}:
38+
- template: sign-artifacts/jobs/v1.yml@internal-templates
39+
parameters:
40+
dependsOn: [ 'build' ]

LineEditor/LineEditor.csproj

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,15 @@
1414
<Title>Mono.Terminal - LineEdit, GetLine</Title>
1515
<Description>Interactive Command Line Editor</Description>
1616
<InferPackageContents>false</InferPackageContents>
17+
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
18+
<IncludeSymbols>True</IncludeSymbols>
19+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
1720
</PropertyGroup>
1821

1922
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
2023
<DocumentationFile>bin\Debug\netstandard2.0\LineEditor.xml</DocumentationFile>
2124
</PropertyGroup>
2225
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
23-
<DebugType></DebugType>
2426
<DocumentationFile>bin\Release\netstandard2.0\LineEditor.xml</DocumentationFile>
2527
</PropertyGroup>
26-
<ItemGroup>
27-
<PackageReference Include="NuGet.Build.Packaging" Version="0.2.0" />
28-
</ItemGroup>
29-
30-
<!-- Workaround for 'Nugetizer packs reference assemblies into NuGet package' issue -->
31-
<!-- https://github.com/NuGet/Home/issues/5800 -->
32-
<ItemGroup>
33-
<PackageFile Include="$(OutputPath)LineEditor.dll" PackagePath="lib/netstandard2.0/LineEditor.dll" />
34-
<PackageFile Include="$(OutputPath)LineEditor.xml" PackagePath="lib/netstandard2.0/LineEditor.xml" />
35-
</ItemGroup>
3628
</Project>

0 commit comments

Comments
 (0)