New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NuGet.exe overrides "xmlns" in nuspec incorrectly #2020
Comments
@emgarten This bug describes that other issue and how to fix it. |
nuget falls back to the oldest xsd that can be used for the nuspec. Where is this actually failing? I wouldn't expect the date field from the url to actually be used as a date. |
It fails while uncompressing the package leaving just a nuspec file and an oddly named (with a short guid) nupkg file in the installation directory (the one under .nuget/packages in the user profile). The xsd is being overridden on pack but causes bugs on restore i.e. its not immediately obvious that it will cause bugs. |
Either way, there is an incompatibility bug between the nuget CLI and NuGet.exe when run on mono with the nuget CLI not supporting the fallback XSD. |
dotnet new classlib closing as fixed - likely in dotnet 1.1, nuget 4.0, vs 2017 version 15.0 era - feb 2017. |
Using NuGet.exe
3.4.0
as well as prior versions, I can observe that the XML namespace referenced in the root element of the nuspec file gets overriden incorrecly in the produced package.DNX as well as the dotnet CLI i.e.
dnu pack
anddotnet pack
set the XML namespace correctly.I define incorrect as "makes the NuGet XPlat CLI crash while restoring with a strange UTC related exception".
To fix such crashes the xmlns value in the root nuspec element should be
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
instead of<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
. This "correct value" is the same one that is set by bothdotnet pack
anddnu pack
. Do note thatdotnet pack
will use the NuGet XPlat CLI once it gets pack support. Please make sure that the XML namespace is set OK to avoid these restore bugs.The text was updated successfully, but these errors were encountered: