Skip to content

Commit

Permalink
Avoid duplicate NullableAttributes.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
dahlbyk committed Apr 23, 2024
1 parent 1eef887 commit d44f69d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/libraries/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@
<!-- Adds Nullable annotation attributes to C# non .NETCoreApp builds. -->
<ItemGroup Condition="'$(Nullable)' != '' and
'$(Nullable)' != 'disable' and
'$(NoIncludeNullableAttributes)' != 'true' and
'$(MSBuildProjectExtension)' == '.csproj' and
'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
<Compile Include="$(CoreLibSharedDir)System\Diagnostics\CodeAnalysis\NullableAttributes.cs" Link="System\Diagnostics\CodeAnalysis\NullableAttributes.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
<NoWarn>$(NoWarn);SYSLIB1103,SYSLIB1104</NoWarn>
<InterceptorsPreviewNamespaces>$(InterceptorsPreviewNamespaces);Microsoft.Extensions.Configuration.Binder.SourceGeneration</InterceptorsPreviewNamespaces>
<EnableConfigurationBindingGenerator>true</EnableConfigurationBindingGenerator>

<!-- Avoid conflict with Microsoft.Extensions.Configuration.Binder (via InternalsVisibleTo) -->
<NoIncludeNullableAttributes>true</NoIncludeNullableAttributes>
</PropertyGroup>

<PropertyGroup>
Expand Down

0 comments on commit d44f69d

Please sign in to comment.