Skip to content

Commit e7a54bd

Browse files
committed
Import shared props in Roslyn5000 project
Replace inline project properties in the Roslyn5000 csproj with imports of the shared props and projitems to centralize configuration. Also add a new conditional DefineConstants in CommunityToolkit.Mvvm.CodeFixers.props to define ROSLYN_5_0_0_OR_GREATER when MvvmToolkitSourceGeneratorRoslynVersion >= 5.0.0, enabling feature flags for Roslyn 5.0.
1 parent b453762 commit e7a54bd

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<PropertyGroup>
4-
<TargetFramework>net10.0</TargetFramework>
5-
<ImplicitUsings>enable</ImplicitUsings>
6-
<Nullable>enable</Nullable>
7-
</PropertyGroup>
3+
<Import Project="..\CommunityToolkit.Mvvm.CodeFixers\CommunityToolkit.Mvvm.CodeFixers.props" />
4+
<Import Project="..\CommunityToolkit.Mvvm.CodeFixers\CommunityToolkit.Mvvm.CodeFixers.projitems" Label="Shared" />
85

96
</Project>

src/CommunityToolkit.Mvvm.CodeFixers/CommunityToolkit.Mvvm.CodeFixers.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
<!-- Also define "ROSLYN_<MAJOR>_<MINOR>_OR_GREATER" build constants, so the generator code can multi-target whenever needed and add any required polyfills -->
2525
<DefineConstants Condition="$([MSBuild]::VersionGreaterThanOrEquals($(MvvmToolkitSourceGeneratorRoslynVersion), 4.3.1))">$(DefineConstants);ROSLYN_4_3_1_OR_GREATER</DefineConstants>
2626
<DefineConstants Condition="$([MSBuild]::VersionGreaterThanOrEquals($(MvvmToolkitSourceGeneratorRoslynVersion), 4.12.0))">$(DefineConstants);ROSLYN_4_12_0_OR_GREATER</DefineConstants>
27+
<DefineConstants Condition="$([MSBuild]::VersionGreaterThanOrEquals($(MvvmToolkitSourceGeneratorRoslynVersion), 5.0.0))">$(DefineConstants);ROSLYN_5_0_0_OR_GREATER</DefineConstants>
2728
</PropertyGroup>
2829

2930
<ItemGroup>

0 commit comments

Comments
 (0)