-
Notifications
You must be signed in to change notification settings - Fork 52
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
[CLEANUP] xmldoc package adds additional newlines in .csproj files #94
Comments
Hey @photomoose, I had not actually seen that the xmldoc toString method is not a guarantee. That's a shame, I would think it would be a main goal of an xml library. The code looks much simpler with fast-xml-parser anyawys, and you've already got it sketched up. If you want to put in a PR for it go ahead, there are a few tests that should be updated as well. |
If you do decide to work on it, go ahead and assign this issue to yourself. |
Sure, I'll see what I can do. I don't appear to have permissions to assign this issue to myself, however - could you assign it to me, please? |
Ah, my bad, I thought you could 😄. You are assigned. Thanks for the contributions! |
@photomoose Are you still planning to work on this? If not, I may pick it up. |
Apologies, I haven't yet had the chance to complete this, what with a
holiday etc.
If you want to take it, then please go ahead, you're likely to compete it
before I will!
…On Wed, 15 Sep 2021 at 18:03, Craigory Coppola ***@***.***> wrote:
@photomoose <https://github.com/photomoose> Are you still planning to
work on this? If not, I may pick it up.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#94 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAPEJFXJSTUL7ZGC2Y2F5JLUCDGVPANCNFSM5CWQBBFQ>
.
|
@photomoose I'm going to tackle this this weekend, your initial investigations should provide a good starting point. Thanks! |
@AgentEnder great stuff, I look forward to the update! FYI: we now have 104 C# projects in our monorepo! We use Rider as our IDE and have imported all the projects into a single solution file, however we use NX Console in VS Code to create the projects via nx-dotnet. |
Have you tried to add this options |
The xmldoc package adds additional newlines when manipulating the .csproj file to add the output path and msbuild task (not sure whether this affects Windows users, but definitely affects MacOS users). Although functionality is not impacted, the additional whitespace looks a bit unsightly, especially when creating xunit test projects, which bring in several PackageReferences.
For example:
The documentation for xmldoc.toString() also states "that this is for debugging only! It is not guaranteed to always output valid XML."
Is it worth considering using a different XML parsing package? I've had a little play with fast-xml-parser - it reads XML into a JS object, then converts a JS object back to XML. For example:
The contents of
newXmlDoc
will be similar to:The text was updated successfully, but these errors were encountered: