Skip to content

Commit e83d2bb

Browse files
authored
Merge pull request #92 from jpinz/chore/package-metadata
Improve NuGet package metadata and AOT compatibility
2 parents 39a28f2 + d514c42 commit e83d2bb

5 files changed

Lines changed: 18 additions & 10 deletions

File tree

Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
https://github.com/dotnet/sourcelink
2020
-->
2121
<PublishRepositoryUrl>true</PublishRepositoryUrl>
22+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
2223
<IncludeSymbols>true</IncludeSymbols>
2324
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
2425
</PropertyGroup>

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ dotnet add package packageurl-dotnet
1717
Or in your project file:
1818

1919
```xml
20-
<PackageReference Include="packageurl-dotnet" Version="1.0.0" />
20+
<PackageReference Include="packageurl-dotnet" Version="2.0.0" />
2121
```
2222

2323
## Usage

src/PackageUrl.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,9 @@ namespace PackageUrl;
4040
/// See <see href="https://ecma-tc54.github.io/ECMA-427/">ECMA-427</see> for the full specification.
4141
/// </para>
4242
/// </summary>
43-
[Serializable]
4443
public sealed class PackageUrl : IEquatable<PackageUrl>
4544
{
46-
private int _hashCode;
45+
private readonly int _hashCode;
4746

4847
/// <summary>
4948
/// The URL scheme. Always <c>"pkg"</c>.

src/PackageUrl.csproj

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
32
<PropertyGroup>
43
<TargetFrameworks>netstandard2.0;net8.0</TargetFrameworks>
5-
<!--
6-
Package
7-
https://docs.microsoft.com/en-us/nuget/reference/msbuild-targets#pack-target
8-
-->
94
<PackageId>packageurl-dotnet</PackageId>
105
<PackageLicenseExpression>MIT</PackageLicenseExpression>
11-
<PackageTags>Package URL;purl</PackageTags>
12-
<PackageDescription>.NET implementation of the package url spec</PackageDescription>
6+
<PackageTags>purl;package-url;ECMA-427;SBOM;SCA</PackageTags>
7+
<PackageDescription>Parse, build, and normalize Package URLs (purl) per ECMA-427. Handles strings like pkg:nuget/Newtonsoft.Json@13.0.1.</PackageDescription>
8+
<PackageProjectUrl>https://github.com/package-url/packageurl-dotnet</PackageProjectUrl>
9+
<PackageReadmeFile>README.md</PackageReadmeFile>
10+
<Copyright>Copyright (c) the packageurl-dotnet authors</Copyright>
1311
<PackageOutputPath>../nuget</PackageOutputPath>
12+
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">true</IsAotCompatible>
1413
</PropertyGroup>
1514

15+
<ItemGroup>
16+
<None Include="../README.md" Pack="true" PackagePath="/" />
17+
</ItemGroup>
1618
</Project>

src/packages.lock.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@
2424
}
2525
},
2626
"net8.0": {
27+
"Microsoft.NET.ILLink.Tasks": {
28+
"type": "Direct",
29+
"requested": "[8.0.24, )",
30+
"resolved": "8.0.24",
31+
"contentHash": "1gnadp//+DoGJvV4AFdzPqYPxkypaWYjYMCr7KAacV0iadsHz1nU+rrkoxBCna4FCmeKH49CisEwa7g94/MbEg=="
32+
},
2733
"MinVer": {
2834
"type": "Direct",
2935
"requested": "[7.0.0, )",

0 commit comments

Comments
 (0)