Skip to content

Commit

Permalink
Don't filter files to show in VS (#148)
Browse files Browse the repository at this point in the history
The Default behavior in VS is to show files for the first target framework in TargetFrameworks property.
This is required to show all the files corresponding to all target frameworks in VS.

dotnet/project-system#935
  • Loading branch information
ViktorHofer authored Oct 30, 2024
1 parent c217b3e commit e9d1a90
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,13 @@
</AssemblyMetadata>
</ItemGroup>

<!-- The Default behavior in VS is to show files for the first target framework in TargetFrameworks property.
This is required to show all the files corresponding to all target frameworks in VS.
https://github.com/dotnet/project-system/issues/935 -->
<ItemGroup Condition="'$(DefaultLanguageSourceExtension)' != '' and
('$(BuildingInsideVisualStudio)' == 'true' or '$(DesignTimeBuild)' == 'true')">
<None Include="$(MSBuildProjectDirectory)\**\*$(DefaultLanguageSourceExtension)"
Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);@(Compile)" />
</ItemGroup>

</Project>

0 comments on commit e9d1a90

Please sign in to comment.