YamlDotNet
YamlDotNet copied to clipboard
Switch from .nuspec files to project properties
Both the main YamlDotNet and the StaticGenerator projects had NuGet package information split between project properties and metadata in the .nuspec file. More confusingly, the projects weren't linked to the nuspec (using <NuspecFile>), so the packages were totally different if build via dotnet pack or nuget pack.
To avoid confusion and simplify future changes, I migrated all the properties from each package into project properties and deleted the nuspec files. I verified via a diff tool that the package contents and manifests are the same except for fixing bugs.
Note that requireLicenseAcceptance=false is now the default, and in both packages rather than specify an icon URL (which is deprecated, we use the icon inside the package.
Here's a diff of each:
YamlDotNet
--- YamlDotNet.nuspec
+++ YamlDotNet.nuspec
@@ -1,27 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
-<package xmlns="http://schemas.microsoft.com/packaging/2013/01/nuspec.xsd">
+<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
- <metadata minClientVersion="2.8">
+ <metadata>
<id>YamlDotNet</id>
<version>1.2.3</version>
<authors>Antoine Aubry</authors>
- <requireLicenseAcceptance>false</requireLicenseAcceptance>
<license type="expression">MIT</license>
<licenseUrl>https://licenses.nuget.org/MIT</licenseUrl>
<icon>images/yamldotnet.png</icon>
<readme>README.md</readme>
- <projectUrl>https://github.com/aaubry/YamlDotNet/wiki</projectUrl>
+ <projectUrl>https://github.com/aaubry/YamlDotNet</projectUrl>
- <iconUrl>http://aaubry.net/images/yamldotnet.png</iconUrl>
- <description>A .NET library for YAML. YamlDotNet provides low level parsing and emitting of YAML as well as a high level object model similar to XmlDocument.</description>
+ <description>YamlDotNet is a .NET library for YAML. YamlDotNet provides low level parsing and emitting of YAML as well as a high level object model similar to XmlDocument. A serialization library is also included that allows to read and write objects from and to YAML streams.</description>
- <summary>This package contains the YAML parser and serializer.</summary>
- <language>en-US</language>
+ <copyright>Copyright (c) Antoine Aubry and contributors</copyright>
<tags>yaml parser development library serialization</tags>
- <repository type="git" url="https://github.com/aaubry/YamlDotNet.git" />
+ <repository type="git" url="https://github.com/aaubry/YamlDotNet" commit="1a8c5ae5da79c56d28eaaa01c8c0d848feb2a8c0" />
<dependencies>
<group targetFramework=".NETFramework4.7" />
<group targetFramework=".NETStandard2.0" />
<group targetFramework=".NETStandard2.1" />
<group targetFramework="net6.0" />
<group targetFramework="net8.0" />
</dependencies>
</metadata>
</package>
YamlDotNet.Analyzers.StaticGenerator
Here the analyzer was incorrectly being put into //analyzers/dotnet/cs/netstandard2.0, when it should instead be either in the parent folder, or should have a roslyn version folder. Thus the analyzer was moved to //analyzers/dotnet/cs
--- YamlDotNet.Analyzers.StaticGenerator.nuspec
+++ YamlDotNet.Analyzers.StaticGenerator.nuspec
@@ -1,19 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
-<package xmlns="http://schemas.microsoft.com/packaging/2013/01/nuspec.xsd">
+<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
- <metadata minClientVersion="2.8">
+ <metadata>
<id>YamlDotNet.Analyzers.StaticGenerator</id>
<version>1.2.3</version>
<authors>YamlDotNet Contributors</authors>
- <requireLicenseAcceptance>false</requireLicenseAcceptance>
<license type="expression">MIT</license>
<licenseUrl>https://licenses.nuget.org/MIT</licenseUrl>
<icon>images/yamldotnet.png</icon>
<projectUrl>https://github.com/aaubry/YamlDotNet/wiki</projectUrl>
- <iconUrl>http://aaubry.net/images/yamldotnet.png</iconUrl>
<description>Roslyn Code Generator that will generate a static context for use with YamlDotNet to support ahead-of-time and library trimming.</description>
- <summary>Static context generator for YamlDotNet.</summary>
- <language>en-US</language>
<tags>yaml parser development library serialization</tags>
- <repository type="git" url="https://github.com/aaubry/YamlDotNet.git" />
+ <repository type="git" url="https://github.com/aaubry/YamlDotNet" commit="8808c6f7272a4416ce3de2aa6076f59d465ab501" />
</metadata>
</package>