Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Exclude is overzealous when exclude pattern is an absolute path prefix of include directory #2813
When building an SDK project, the source files are not being collected correctly, causing a "CS5001: Program does not contain a static 'Main' method suitable for an entry point" error. If I change the
Still repro'ed on latest stable 2.2, but could not repro on
Man, github is a small world, I actually went to school with @rla4, whether she remembers or not.
I am not sure exactly which change happened in 3.0 to fix this issue there. @peterhuene can you take a look? Depending on the change, we can try to do bar check and bring it the fix to 2.2 in a servicing release.
I'm actually able to reproduce this in 3.0, both in
I can also reproduce it without modifying the output path and without default items enabled:
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>netcoreapp3.0</TargetFramework> <EnableDefaultItems>false</EnableDefaultItems> </PropertyGroup> <ItemGroup> <Compile Include="**/*.cs" Exclude="c:\users\peter\foo/**/*" /> </ItemGroup> </Project>
Note: replace the full path in the exclude to be the same base bath where
Pinging @rainersigwald in case he has additional information that might be useful.