You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The NuspecReader was hardcoded to always assume the nuspec v6 schema.
However, the NuGet client will use the _oldest_ schema it can when
creating a package.
Update the reader so it uses whatever the provided XML schema is.
Copy file name to clipboardExpand all lines: src/Microsoft.Build.Utilities.ProjectCreation.UnitTests/NuspecReaderTests.cs
+24Lines changed: 24 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -34,5 +34,29 @@ public void LicenseExpressionIsNullForFileLicenses()
34
34
nuspec.LicenseVersion.ShouldBeNull();
35
35
nuspec.LicenseUrl.ShouldBeNull();
36
36
}
37
+
38
+
// List of namespaces from https://github.com/NuGet/NuGet.Client/blob/6917e6c883d45f45672e20d4b1c45758dad2fa84/src/NuGet.Core/NuGet.Packaging/PackageCreation/Authoring/ManifestSchemaUtility.cs#L23-L50
thrownewXmlException($"Unabled to determine nuspec XML namespace. Namespaces in scope: '{string.Join(",",newDictionary<string,string>(namespaces))}'.");
0 commit comments