In an earlier post, I detailed how I converted a personal project across to the new csproj file format - it turns out that I made a few mistakes in the process.
One of the benefits of the new file format is that we no longer need to explicitly list every single source file. We can use wildcards like this:
But, instead of supplying wildcards explicitly, there’s a better way - the tooling includes default rules.
Remove the wildcard elements shown above and check to see if you have a
<EnableDefaultCompileItems> element. If you do, either delete it (recommended), or change the value to
I discovered this when my builds started throwing some odd errors = like this one:
The source of my problem was trying to use the new
.csproj file-format for a WPF project - that’s not currently supported and doesn’t seem to work. Fixing the inclusion rules didn’t fix that problem, unfortunately.