34
34
<PackageReference Include =" System.Runtime.CompilerServices.Unsafe" Version =" 6.0.0" />
35
35
</ItemGroup >
36
36
37
- <!-- Reference the various multi-targeted versions of the source generator project (one per Roslyn version) -->
37
+ <!-- Reference the various multi-targeted versions of the source generator project (one per Roslyn version), and the code fixer -->
38
38
<ItemGroup Condition =" '$(TargetFramework)' == 'netstandard2.0'" >
39
39
<ProjectReference Include =" ..\CommunityToolkit.Mvvm.SourceGenerators.Roslyn401\CommunityToolkit.Mvvm.SourceGenerators.Roslyn401.csproj" ReferenceOutputAssembly =" false" />
40
40
<ProjectReference Include =" ..\CommunityToolkit.Mvvm.SourceGenerators.Roslyn431\CommunityToolkit.Mvvm.SourceGenerators.Roslyn431.csproj" ReferenceOutputAssembly =" false" />
41
+ <ProjectReference Include =" ..\CommunityToolkit.Mvvm.Fixers\CommunityToolkit.Mvvm.Fixers.csproj" ReferenceOutputAssembly =" false" />
41
42
</ItemGroup >
42
43
43
44
<!-- Add the [InternalsVisibleTo] attribute for the test project -->
73
74
<!--
74
75
Pack the source generator to the right package folders (each matching the target Roslyn version).
75
76
Roslyn will automatically load the highest version compatible with Roslyn's version in the SDK.
77
+ Also pack the code fixer along with each target analyzer, the multi-targeting take care of it.
78
+ Note: the code fixer is not currently multi-targeting, as there are no Roslyn APIs it needs from
79
+ versions later than 4.0.1. As such, we can just use a single project (without the shared project
80
+ and two multi-targeted ones), and pack the resulting assembly twice along with the generators.
81
+ Even though the fixer only references the 4.0.1 generator target, both versions export the same
82
+ APIs that the code fixer project needs, and Roslyn versions are also forward compatible.
76
83
-->
77
84
<None Include =" ..\CommunityToolkit.Mvvm.SourceGenerators.Roslyn401\bin\$(Configuration)\netstandard2.0\CommunityToolkit.Mvvm.SourceGenerators.dll" PackagePath =" analyzers\dotnet\roslyn4.0\cs" Pack =" true" Visible =" false" />
78
85
<None Include =" ..\CommunityToolkit.Mvvm.SourceGenerators.Roslyn431\bin\$(Configuration)\netstandard2.0\CommunityToolkit.Mvvm.SourceGenerators.dll" PackagePath =" analyzers\dotnet\roslyn4.3\cs" Pack =" true" Visible =" false" />
86
+ <None Include =" ..\CommunityToolkit.Mvvm.Fixers\bin\$(Configuration)\netstandard2.0\CommunityToolkit.Mvvm.Fixers.dll" PackagePath =" analyzers\dotnet\roslyn4.0\cs" Pack =" true" Visible =" false" />
87
+ <None Include =" ..\CommunityToolkit.Mvvm.Fixers\bin\$(Configuration)\netstandard2.0\CommunityToolkit.Mvvm.Fixers.dll" PackagePath =" analyzers\dotnet\roslyn4.3\cs" Pack =" true" Visible =" false" />
79
88
</ItemGroup >
80
89
81
90
</Project >
0 commit comments