-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Round trip formatting / comments #707
Comments
It not only changes the location of comments, it also changes indentation, and removes non-significant whitespace. I did some investigation, and looks like this is going to be an easy fix to preserve whitespace/comments, etc. CPS calls through |
It doesn't have to be an overload, it could just a mutable property on the ProjectRootElement, or however, you want to design it. |
@davkean Does CPS set the |
I have a work in progress fix for this at https://github.com/dsplaisted/msbuild/tree/AllowPreserveWhitespace It turns out that single quotes are being converted to double quotes when a project is saved. IE this: <ProjectReference Include='..\CLREXE\CLREXE.vcxproj'> Will be converted to this: <ProjectReference Include="..\CLREXE\CLREXE.vcxproj"> I haven't figured out where the quote conversion is happening yet. |
Not sure the relevance of MSBUILDCACHECHECKFILECONTENT, from what I see - it's just a test hook. Not too worried about the single quote -> double quote conversion, I wouldn't block the check-in on that (it's probably in the XML writer). Can we get this in soon? |
This issue is in the open design phase and is a part of the project.json -> csproj conversion effort.
We should preserve user authored content/whitespace in project files when saving.
E.g.
Today will be re-saved as:
We should investigate to see if there's an easy win here, but we should not be creating our own XML writer for this release.
The text was updated successfully, but these errors were encountered: