-
Notifications
You must be signed in to change notification settings - Fork 905
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
Building a package on Linux fails if the description has encoded xml special character(s) #2382
Comments
I think it is pretty likely that this is an issue in nuget-chocolatey or in mono, not in the choco code base. Debugging this is complicated because I can't get the vscode-mono-debug extension to debug the nuget.core.dll, and because the actual error shows up when the |
Ok, this seems to be another mono bug like #2076. Sigh. I don't think I've had anyone look at my PR to fix the previous issue I found, and it's been open since May. I've got a POC program using System.IO.Packaging that works on Windows, but fails on Mono.
|
I've opened an issue with mono here: mono/mono#21227 |
A fix has been proposed by @TheCakeIsNaOH is a lie here: chocolatey/nuget-chocolatey#27 which we will pull into chocolatey/choco in the next release. |
This new assembly includes a fix to address an issue when attempting to pack a Chocolatey nuspec file that contains escaped XML characters on a Linux machine. During testing, it was found that a nuspec file that contains escaped XML characters would work fine on a Windows machine, but the build would fail on a Linux machine. A change was applied upstream to correct this inconsistency.
This doesn't happen automagically, since this is a direct reference to the assembly, rather than an actual NuGet package reference.
@TheCakeIsNaOH I have just tested this, and all seems to be working now! Thanks again for getting this fixed up! |
…sole In commit 545ca6c, the chocolatey.console cs project was not updated, unlike the other projects. This updates that project in line with the others.
(#2382) Reference new NuGet.Core assembly in chocolatey.console
This is a companion issue to: chocolatey/nuget-chocolatey#27
What You Are Seeing?
When running on Mono on Linux, if
choco pack
is run on a.nuspec
that contains encoded xml special character(s), it fails. Specifically with using<
and>
as shown in dust. This package does build without issues on Windows.It fails with
Unexpected end of file has occurred. The following elements are not closed:
I have not tested this to check if other encoded special characters work or not.
What is Expected?
That
choco pack
works.How Did You Get This To Happen? (Steps to Reproduce)
https://github.com/Starz0r/ChocolateyPackagingScripts/tree/ca30cc5f3eba19f535c82df46b57a2efc8bdf932
choco pack
Workaround
Wrapping the description in with
cdata
will allowchoco pack
to work.Example:
https://github.com/mkevenaar/chocolatey-packages/blob/master/automatic/anyrail6/anyrail6.nuspec#L48
Output Log
Full Log Output
The text was updated successfully, but these errors were encountered: