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
The text was updated successfully, but these errors were encountered:
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.
…0190911.2 (#2813) - Microsoft.NETCore.App - 5.0.0-alpha1.19461.2 Dependency coherency updates - Microsoft.NET.Sdk.WindowsDesktop - 5.0.0-alpha1.19460.11 (parent: Microsoft.NETCore.App) - System.CodeDom - 5.0.0-alpha1.19460.21 (parent: Microsoft.NETCore.App) - System.Security.Cryptography.ProtectedData - 5.0.0-alpha1.19460.21 (parent: Microsoft.NETCore.App) - System.Text.Encoding.CodePages - 5.0.0-alpha1.19460.21 (parent: Microsoft.NETCore.App)