Currently, in a C# project we'll only create MSBuild items for three of these:
contentFiles/cs/any/Container.cs
contentFiles/cs/any/ImTools.cs
contentFiles/cs/net472/Alpha.cs
I believe the correct behavior is to create MSBuild items for all seven.
There are two overlapping issues:
We simply ignore any item that specifies "buildAction": "None" on the assumption that these items do not participate in the build (which is a bad assumption, and out-of-sync with what happens in SDK-style projects).
If any item in contentFiles has a codeLanguage matching the project language (e.g. C#, VB, F#, etc.) then we ignore those with "codeLanguage": "any". I believe the correct behavior is to always pick up all the files marked with "codeLanguage": "any", plus all the items with a codeLanguage that matches the project language.
Fixes https://github.com/dotnet/project-system/issues/3042.
Consider the following content files from a sample project.assets.json file:
Currently, in a C# project we'll only create MSBuild items for three of these:
I believe the correct behavior is to create MSBuild items for all seven.
There are two overlapping issues:
"buildAction": "None"
on the assumption that these items do not participate in the build (which is a bad assumption, and out-of-sync with what happens in SDK-style projects).contentFiles
has acodeLanguage
matching the project language (e.g. C#, VB, F#, etc.) then we ignore those with"codeLanguage": "any"
. I believe the correct behavior is to always pick up all the files marked with"codeLanguage": "any"
, plus all the items with acodeLanguage
that matches the project language.