Hacker News new | ask | show | jobs
by guiomie 4414 days ago
Can you elaborate on why a json format would be better for a csproj ?

I have issues with the .csproj also, but I don't think json would fix anything, my issue is usually with visual studio and the confguration manager not applying changes...

3 comments

For me - it'll be reading it.

I have to deal quite often with "Unload Project file" in MSVC IDE, edit by hand, "Load again" - because no matter how good the IDE is (and Visual Studio is a good IDE overall) there are lots of edge cases where it fails (merging multiple settings per project / per configuration / etc.)

re: readability

project.json (.csproj/packages.config/nuspec file replacement) has been unveiled:

https://github.com/aspnet/DependencyInjection/blob/dev/src/M...

re: load/unload process

VSCommands Pro Extension adds the ability to right click on a project to automate the unload, edit, reload cycle and offers editing inline.

http://visualstudiogallery.msdn.microsoft.com/c6d1c265-7007-...

I personally find the human readability of JSON to be superior to XML in this kind of configuration scenario, but I think what I really meant to say was that switching to JSON hopefully provides them the opportunity to redesign the file format from the ground up to be more sane. My specific hopes:

1) That the new format will be more convention-over-configuration based and not have to be 100+ lines for a default project.

2) As I've mentioned in the parent post, I hope that you don't have to list individual files in the equivalent of <ItemGroup> blocks - you should instead only need to add an exceptions to whatever convention is being applied.

Readability when not using VS, for one. If you're rolling your own csproj (or need to edit it) to use with MSBuild, or some other build system, JSON is easier to read than XML.