Hacker News new | ask | show | jobs
by ToastyMallows 4414 days ago
Re: listing every file

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.

1 comments

Yes, just wildcard include all *.cs files. You'll still have to list any potential embedded resources explicitly in your CSPROJ, as well as list any exceptions (please don't compile example.cs, for instance), but why add each and every .cs file to the CSProj explicitly?
This may actually take longer than having a line item for each file, consider:

> 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.

Visual Studio doesn't open all of the *.cs files listed in the CSProj file, they're only pulled in by MSBuild while building. Also MSBuild supports wildcards today and it is plenty fast - it is just Visual Studio that screws it up.

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.

We will support both inclusive and exclusive patterns.
Valid points. We'll see what they do!