Skip to content

Commit 6423696

Browse files
committed
Add Roslyn 5.0.0 unit test project
Introduces CommunityToolkit.Mvvm.Roslyn5000.UnitTests.csproj targeting net472, net8.0, and net9.0. Updates the solution file to include the new test project for Roslyn 5.0.0 compatibility testing.
1 parent 2c29482 commit 6423696

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

dotnet.slnx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
<Project Path="tests/CommunityToolkit.Mvvm.Roslyn4001.UnitTests/CommunityToolkit.Mvvm.Roslyn4001.UnitTests.csproj" />
3838
<Project Path="tests/CommunityToolkit.Mvvm.Roslyn4031.UnitTests/CommunityToolkit.Mvvm.Roslyn4031.UnitTests.csproj" />
3939
<Project Path="tests/CommunityToolkit.Mvvm.Roslyn4120.UnitTests/CommunityToolkit.Mvvm.Roslyn4120.UnitTests.csproj" />
40+
<Project Path="tests/CommunityToolkit.Mvvm.Roslyn5000.UnitTests/CommunityToolkit.Mvvm.Roslyn5000.UnitTests.csproj" />
4041
<Project Path="tests/CommunityToolkit.Mvvm.SourceGenerators.Roslyn4001.UnitTests/CommunityToolkit.Mvvm.SourceGenerators.Roslyn4001.UnitTests.csproj" />
4142
<Project Path="tests/CommunityToolkit.Mvvm.SourceGenerators.Roslyn4031.UnitTests/CommunityToolkit.Mvvm.SourceGenerators.Roslyn4031.UnitTests.csproj" />
4243
<Project Path="tests/CommunityToolkit.Mvvm.SourceGenerators.Roslyn4120.UnitTests/CommunityToolkit.Mvvm.SourceGenerators.Roslyn4120.UnitTests.csproj" />
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFrameworks>net472;net8.0;net9.0</TargetFrameworks>
5+
<LangVersion>preview</LangVersion>
6+
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
7+
<DefineConstants>$(DefineConstants);ROSLYN_4_12_0_OR_GREATER;ROSLYN_5_0_0_OR_GREATER</DefineConstants>
8+
9+
<!-- We're intentionally also using '[ObservableProperty]' on some fields, for testing -->
10+
<NoWarn>$(NoWarn);MVVMTK0042</NoWarn>
11+
</PropertyGroup>
12+
13+
<ItemGroup>
14+
<Compile Include="..\CommunityToolkit.Mvvm.Roslyn4120.UnitTests\Test_ObservablePropertyAttribute_PartialProperties.cs" Link="Test_ObservablePropertyAttribute_PartialProperties.cs" />
15+
</ItemGroup>
16+
17+
<ItemGroup>
18+
<PackageReference Include="Dbs.Signed3.Nito.AsyncEx.Context" Version="5.0.0" />
19+
<PackageReference Include="MSTest.TestAdapter" Version="4.0.1" />
20+
<PackageReference Include="MSTest.TestFramework" Version="4.0.1" />
21+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.0" />
22+
<PackageReference Include="System.Reactive" Version="6.1.0" />
23+
<PackageReference Include="System.Text.Json" Version="9.0.10" />
24+
</ItemGroup>
25+
26+
<ItemGroup>
27+
<ProjectReference Include="..\CommunityToolkit.Mvvm.ExternalAssembly.Roslyn4031\CommunityToolkit.Mvvm.ExternalAssembly.Roslyn4031.csproj" />
28+
<ProjectReference Include="..\..\src\CommunityToolkit.Mvvm\CommunityToolkit.Mvvm.csproj" />
29+
<ProjectReference Include="..\..\src\CommunityToolkit.Mvvm.SourceGenerators.Roslyn5000\CommunityToolkit.Mvvm.SourceGenerators.Roslyn5000.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" PrivateAssets="contentfiles;build" />
30+
<ProjectReference Include="..\..\src\CommunityToolkit.Mvvm.CodeFixers.Roslyn4120\CommunityToolkit.Mvvm.CodeFixers.Roslyn4120.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" PrivateAssets="contentfiles;build" />
31+
</ItemGroup>
32+
33+
<Import Project="..\CommunityToolkit.Mvvm.UnitTests\CommunityToolkit.Mvvm.UnitTests.projitems" Label="Shared" />
34+
35+
</Project>

0 commit comments

Comments
 (0)