I recall CSPROJ files being the primary source of pain for me as I started to transition out of the Microsoft world and into the open source world, as it prevents you from using editors like vim & emacs if you're working in a team environment.
I recall CSPROJ files being the primary source of pain for me as I started to transition out of the Microsoft world and into the open source world, as it prevents you from using editors like vim & emacs if you're working in a team environment.
This comment strikes me as a bit odd. While Csproj-files were never pretty they were XML, they were structured and they last but not least: they were mergeable.
Contrast that to the actually horrible file-format that is SLN-files. Yes, it's plaintext, but it has projects named and numbered in sequential order, meaning doing any sort of merge or multibranch development is impossible unless you manually recreate all changes done to SLN files in all branches.
Microsoft going ahead and "fixing" CSPROJ-files, and not SLN-files is just madness. Consider me disappointed.
(Also CSProj files aren't super fun to merge using git and change very frequently. See: http://stackoverflow.com/questions/13479294/why-are-my-cspro...)
Ideally the csproj file should rarely become modified. Talk to any team of more than 2 developers and they'll confirm that pain of dealing with mundane csproj conflicts.
As far as XML versus JSON, I really don't care at all since I don't intend on looking at them or modifying them every day.
Now that they're rolling packages.json into the project file you'll be editing it more frequently than you might think. (Though most Microsoft ecosystem developers will likely prefer to use a GUI of some sort to do so.)
<Compile Include=".\**\*.cs" />
The downside is that VS doesn't automatically pick up on the file system event notifications in that case, so you have to unload/reload the project whenever a file gets added.I've always found it weird that they don't fix this, especially given how easy the fix seems to be:
1. When a file is added, VS could re-run the wildcard matches to see if they match the new file. If they do, don't add an explicit entry.
2. VS could turn the file list into a unique file list before passing it to the compiler.
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...
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.)
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-...
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.
I agree with you though - its a PITA.
How do you think they will get around that? Just include a directory? Not that this will affect me much because I'm almost never in .csproj files because the IDE (Visual Studio) does 99% of things for me.
> Visual Studio, please open all *.cs files in this directory (recursive)
vs.
> Visual Studio, open all of these files
Also, by itemizing each file you can exclude single files from build easier.
This is all speculation.
EDIT: Also, I think they did this because they didn't expect users to be mucking around in .csproj files.
As far as "exclude single files from build easier"... if you want to optimize for that why not invert the paradigm? Instead of listing every file that IS included, list the ones that aren't.