3 ms·
Maybe it is possible to put comments in .csproj files, but that isn't exactly a common use case.
by MartinCron 12y ago
Maybe it is possible to put comments in .csproj files, but that isn't exactly a common use case.
- DougWebb 12y agoIt's definitely not a common use case, because VS reformats the csproj files whenever it modifies them. Basically, when you make a change within VS that affects the csproj file, the entire file is pulled in through an XML parser into a DOM representation, modified in-memory, then serialized back out to XML. Frankly, I'm surprised comments are retained at all.
- ygra 12y agoXML comments are part of the DOM and are retained, usually. And Visual Studio has become quite good at not clobbering things it does not modify itself. The project files are still normal MSBuild projects, so editing them by hand to add targets of other customisations isn't exactly uncommon.
- MichaelGG 12y agoExcept the apparent point of using JSON is to make it more human friendly. Otherwise, changing the format is quite pointless and not much of a feature to talk about.