Skip to content

Commit d44f69d

Browse files
committed
Avoid duplicate NullableAttributes.cs
1 parent 1eef887 commit d44f69d

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/libraries/Directory.Build.targets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@
170170
<!-- Adds Nullable annotation attributes to C# non .NETCoreApp builds. -->
171171
<ItemGroup Condition="'$(Nullable)' != '' and
172172
'$(Nullable)' != 'disable' and
173+
'$(NoIncludeNullableAttributes)' != 'true' and
173174
'$(MSBuildProjectExtension)' == '.csproj' and
174175
'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
175176
<Compile Include="$(CoreLibSharedDir)System\Diagnostics\CodeAnalysis\NullableAttributes.cs" Link="System\Diagnostics\CodeAnalysis\NullableAttributes.cs" />

src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Microsoft.Extensions.Configuration.Binder.SourceGeneration.Tests.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
<NoWarn>$(NoWarn);SYSLIB1103,SYSLIB1104</NoWarn>
99
<InterceptorsPreviewNamespaces>$(InterceptorsPreviewNamespaces);Microsoft.Extensions.Configuration.Binder.SourceGeneration</InterceptorsPreviewNamespaces>
1010
<EnableConfigurationBindingGenerator>true</EnableConfigurationBindingGenerator>
11+
12+
<!-- Avoid conflict with Microsoft.Extensions.Configuration.Binder (via InternalsVisibleTo) -->
13+
<NoIncludeNullableAttributes>true</NoIncludeNullableAttributes>
1114
</PropertyGroup>
1215

1316
<PropertyGroup>

0 commit comments

Comments
 (0)