_From @jinujoseph on February 8, 2017 23:9_
Create a ClassLibrary (.Net Core)
Take a copy of Class1.cs and drop in the same folder
you will see of them included
Now edit the csproj and put the below information
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<EnableDefaultCompileItems>False</EnableDefaultCompileItems>
<TargetFramework>netcoreapp1.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="Class1.cs" />
</ItemGroup>
</Project>
Build again , it includes only Class1.cs but the solution explorer shows all files, expected ?
Build
26206.0.d15rel
_Copied from original issue: dotnet/project-system#1504_
_From @davkean on February 9, 2017 0:19_
This is because <None>
picks them up. @dsplaisted
Another side effect of this reported through VSFeedback is that when the user goes to add a cs file to the project in this state, the None glob picks it up and so it's not passed to the compiler as a source file.
_From @davkean on February 22, 2017 23:6_
Ah, that's bad.
Moving this to SDK since this is caused by the None globs - @dsplaisted are they really useful? I find the None globs more annoying than useful since it picks up all files in that folder
@srivatsn , @livarcocc Any timeline for the fix or known workarounds?
@dsplaisted for a work around.
See https://github.com/dotnet/project-system/issues/3181#issuecomment-368396256
maybe None shouldn't include source files?
Yes, I think this is the right fix.
@livarcocc @dsplaisted, we should probably re-triage this. It gets reported a lot and I think @davkean has a good, simple proposal to address it.
Most helpful comment
Moving this to SDK since this is caused by the None globs - @dsplaisted are they really useful? I find the None globs more annoying than useful since it picks up all files in that folder