[One .NET] set $(PackageType) of DotnetPlatform#5636
Merged
jonathanpeppers merged 1 commit intodotnet:masterfrom Feb 20, 2021
Merged
[One .NET] set $(PackageType) of DotnetPlatform#5636jonathanpeppers merged 1 commit intodotnet:masterfrom
jonathanpeppers merged 1 commit intodotnet:masterfrom
Conversation
Merged
radekdoulik
approved these changes
Feb 18, 2021
pjcollins
reviewed
Feb 19, 2021
Context: https://docs.microsoft.com/en-us/nuget/create-packages/set-package-type Context: https://github.com/dotnet/runtime/blob/86d5d16d31ee46d619b4d9af510f307ed7da4846/src/installer/tests/Microsoft.DotNet.CoreSetup.Packaging.Tests/NuGetArtifactTester.cs#L142-L149 This is the pattern to follow for a package that is part of .NET that people should not install directly. It prevents you from being able to use `@(PackageReference)` for our packages -- which would not work anyway. If I review `Microsoft.NetCore.App.Runtime.android-arm.nuspec`, this is how `$(PackageType)` is expressed within the `.nupkg` file: <?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd"> <metadata> <!-- ... --> <packageTypes> <packageType name="DotnetPlatform" /> </packageTypes> </metadata> </package> We should set this for all .NET 6 `.nupkg` files we produce except for Microsoft.Android.Templates, which uses `PackageType=Template`.
c69a550 to
38f50ae
Compare
jonathanpeppers
commented
Feb 19, 2021
|
|
||
| <PropertyGroup> | ||
| <TargetFramework>net6.0</TargetFramework> | ||
| <PackageType>DotnetPlatform</PackageType> |
Member
Author
There was a problem hiding this comment.
/cc @rolfbjarne at some point, you might add this to the iOS/Mac packages. Just so people can't attempt to add a <PackageReference/> to them.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context: https://docs.microsoft.com/en-us/nuget/create-packages/set-package-type
Context: https://github.com/dotnet/runtime/blob/86d5d16d31ee46d619b4d9af510f307ed7da4846/src/installer/tests/Microsoft.DotNet.CoreSetup.Packaging.Tests/NuGetArtifactTester.cs#L142-L149
This is the pattern to follow for a package that is part of .NET that
people should not install directly. It prevents you from being able to
use
@(PackageReference)for our packages -- which would not workanyway.
If I review
Microsoft.NetCore.App.Runtime.android-arm.nuspec, thisis how
$(PackageType)is expressed within the.nupkgfile:We should set this for all .NET 6
.nupkgfiles we produce except forMicrosoft.Android.Templates, which uses
PackageType=Template.