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
Please read the following information before posting the issue.
Before posting the issue...
If you're having trouble with the NuGet.org Website, please post in NuGetGallery issues
If you're having trouble with the NuGet client tools (the Visual Studio extension, NuGet.exe command line tool, etc.), you are in the right place.
Remove the content above here and fill out details below.
Details about Problem
NuGet product used (NuGet.exe | VS UI | Package Manager Console | dotnet.exe):
dotnet.exe
NuGet version (x.x.x.xxx):
4.9.2.0
dotnet.exe --version (if appropriate):
2.2.103
Worked before? If so, with which NuGet version:
nope
Detailed repro steps so we can see the same problem
Generate a nuspec with LicenseExpression and save using Manifest.Save
Load that Nuspec with Manifest.ReadFrom
Expect: success in round-tripping nuspec
Actual:
System.Exception: The licenseUrl and license elements cannot be used together.
at NuGet.Packaging.Manifest.Validate(Manifest manifest)
at NuGet.Packaging.Manifest.ReadFrom(Stream stream, Func`2 propertyProvider, Boolean validateSchema)
The same can be observed if you try to use Manifest.ReadFrom with any nuspec that's in a dotnet-pack'ed package that used LicenseExpression.
Please read the following information before posting the issue.
Before posting the issue...
Remove the content above here and fill out details below.
Details about Problem
NuGet product used (NuGet.exe | VS UI | Package Manager Console | dotnet.exe):
dotnet.exe
NuGet version (x.x.x.xxx):
4.9.2.0
dotnet.exe --version (if appropriate):
2.2.103
Worked before? If so, with which NuGet version:
nope
Detailed repro steps so we can see the same problem
Generate a nuspec with LicenseExpression and save using Manifest.Save
Load that Nuspec with Manifest.ReadFrom
Expect: success in round-tripping nuspec
Actual:
The same can be observed if you try to use Manifest.ReadFrom with any nuspec that's in a dotnet-pack'ed package that used LicenseExpression.
The culprit appears to be a bad equality check here:
https://github.com/NuGet/NuGet.Client/blob/91d2331328d55ab9f450af1fbf184fc1f261ed25/src/NuGet.Core/NuGet.Packaging/PackageCreation/Authoring/ManifestMetadata.cs#L336-L339
It's calling String.Equals and passing a URI.
dotnet/arcade#2091 (comment) /cc @tmat @nkolev92
The text was updated successfully, but these errors were encountered: