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

Conversation

@jonpryor
Copy link
Contributor

@jonpryor jonpryor commented Oct 16, 2020

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.

Copy link
Contributor

@mattleibow mattleibow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good so far.

Comment on lines 30 to 35
<!-- https://github.com/NuGet/Home/issues/5800 -->
<ItemGroup>
<PackageFile Include="$(OutputPath)LineEditor.dll" PackagePath="lib/netstandard2.0/LineEditor.dll" />
<PackageFile Include="$(OutputPath)LineEditor.pdb" PackagePath="lib/netstandard2.0/LineEditor.pdb" />
<PackageFile Include="$(OutputPath)LineEditor.xml" PackagePath="lib/netstandard2.0/LineEditor.xml" />
</ItemGroup>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove all this (and the NuGet.Build.Packaging) package (lines 25-35). Then we can just do msbuild /t:pack and let the tools do the work.

Comment on lines 28 to 29
validPackagePrefixes:
- Mono
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
validPackagePrefixes:
- Mono
skipValidation: true

Copy link
Contributor

@mattleibow mattleibow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add this to prevent any issues with an unexpected symbols package. Most wildcards will be able to skin the snupkg.

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.
@jonpryor jonpryor merged commit bce1b7f into master Oct 19, 2020
@jonpryor jonpryor deleted the jonp-yaml-build branch October 19, 2020 19:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants