Skip to content

Commit b0eee49

Browse files
Address feedback from #79828. (#80509)
1 parent 3f03037 commit b0eee49

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.TestLibrary/System.Text.Json.TestLibrary.Roslyn4.4.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
<Import Project="System.Text.Json.TestLibrary.targets" />
44

55
<ItemGroup>
6-
<ProjectReference Include="..\..\gen\System.Text.Json.SourceGeneration.Roslyn4.4.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
6+
<!-- The Roslyn4.4 project uses multi-targeting to enable nullability annotations,
7+
so we need to explicitly reference the ns2.0 TFM used by the production source generator -->
8+
<ProjectReference Include="..\..\gen\System.Text.Json.SourceGeneration.Roslyn4.4.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" SetTargetFramework="TargetFramework=netstandard2.0" />
79
</ItemGroup>
810
</Project>

src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Tests/System.Text.Json.SourceGeneration.Roslyn4.4.Tests.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
<Import Project="System.Text.Json.SourceGeneration.Tests.targets" />
1313

1414
<ItemGroup>
15-
<ProjectReference Include="..\..\gen\System.Text.Json.SourceGeneration.Roslyn4.4.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" SetTargetFramework="TargetFramework=netstandard2.0" SkipGetTargetFrameworkProperties="true" />
15+
<!-- The Roslyn4.4 project uses multi-targeting to enable nullability annotations,
16+
so we need to explicitly reference the ns2.0 TFM used by the production source generator -->
17+
<ProjectReference Include="..\..\gen\System.Text.Json.SourceGeneration.Roslyn4.4.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" SetTargetFramework="TargetFramework=netstandard2.0" />
1618
<ProjectReference Include="..\System.Text.Json.SourceGeneration.TestLibrary\System.Text.Json.TestLibrary.Roslyn4.4.csproj" />
1719
</ItemGroup>
1820
</Project>

src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/System.Text.Json.SourceGeneration.Roslyn4.4.Unit.Tests.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
<Import Project="System.Text.Json.SourceGeneration.Unit.Tests.targets" />
1313

1414
<ItemGroup>
15-
<ProjectReference Include="..\..\gen\System.Text.Json.SourceGeneration.Roslyn4.4.csproj" />
15+
<!-- The Roslyn4.4 project uses multi-targeting to enable nullability annotations,
16+
so we need to explicitly reference the ns2.0 TFM used by the production source generator -->
17+
<ProjectReference Include="..\..\gen\System.Text.Json.SourceGeneration.Roslyn4.4.csproj" SetTargetFramework="TargetFramework=netstandard2.0" />
1618
</ItemGroup>
1719
</Project>

0 commit comments

Comments
 (0)