File tree Expand file tree Collapse file tree 6 files changed +12
-8
lines changed Expand file tree Collapse file tree 6 files changed +12
-8
lines changed Original file line number Diff line number Diff line change 27
27
<MvvmToolkitSourceGeneratorRoslynPatchVersion >$(MSBuildProjectName.Substring($([MSBuild]::Subtract($(MSBuildProjectName.Length), 1)), 1))</MvvmToolkitSourceGeneratorRoslynPatchVersion >
28
28
<MvvmToolkitSourceGeneratorRoslynVersion >$(MvvmToolkitSourceGeneratorRoslynMajorVersion).$(MvvmToolkitSourceGeneratorRoslynMinorVersion).$(MvvmToolkitSourceGeneratorRoslynPatchVersion)</MvvmToolkitSourceGeneratorRoslynVersion >
29
29
30
- <!-- Also define a "ROSLYN_<MAJOR>_<MINOR>" build constant, so the generator code can multi-target whenever needed and add any required polyfills -->
31
- <DefineConstants >$(DefineConstants);ROSLYN_$(MvvmToolkitSourceGeneratorRoslynVersion.Substring(0, 3).Replace('.', '_'))</DefineConstants >
30
+ <!-- Workaround for https://github.com/dotnet/roslyn/issues/63919 -->
31
+ <MvvmToolkitSourceGeneratorRoslynVersion Condition =" '$(MvvmToolkitSourceGeneratorRoslynVersion)' == '4.3.0'" >4.4.0-1.final</MvvmToolkitSourceGeneratorRoslynVersion >
32
+
33
+ <!-- Also define "ROSLYN_<MAJOR>_<MINOR>_OR_GREATER" build constants, so the generator code can multi-target whenever needed and add any required polyfills -->
34
+ <DefineConstants Condition =" $([MSBuild]::VersionGreaterThanOrEquals($(MvvmToolkitSourceGeneratorRoslynVersion), 4.3))" >$(DefineConstants);ROSLYN_4_3_0_OR_GREATER</DefineConstants >
32
35
</PropertyGroup >
33
36
34
37
<ItemGroup >
Original file line number Diff line number Diff line change 3
3
// See the LICENSE file in the project root for more information.
4
4
5
5
using System . Collections . Immutable ;
6
- #if ! ROSLYN_4_3
6
+ #if ! ROSLYN_4_3_0_OR_GREATER
7
7
using System . Diagnostics . CodeAnalysis ;
8
8
#endif
9
9
using Microsoft . CodeAnalysis ;
@@ -67,7 +67,7 @@ public static bool HasAttributeWithFullyQualifiedName(this ISymbol symbol, strin
67
67
return false ;
68
68
}
69
69
70
- #if ! ROSLYN_4_3
70
+ #if ! ROSLYN_4_3_0_OR_GREATER
71
71
/// <summary>
72
72
/// Tries to get an attribute with the specified full name.
73
73
/// </summary>
Original file line number Diff line number Diff line change 2
2
// The .NET Foundation licenses this file to you under the MIT license.
3
3
// See the LICENSE file in the project root for more information.
4
4
5
- #if ! ROSLYN_4_3
5
+ #if ! ROSLYN_4_3_0_OR_GREATER
6
6
7
7
using System . Collections . Immutable ;
8
8
Original file line number Diff line number Diff line change 2
2
// The .NET Foundation licenses this file to you under the MIT license.
3
3
// See the LICENSE file in the project root for more information.
4
4
5
- #if ! ROSLYN_4_3
5
+ #if ! ROSLYN_4_3_0_OR_GREATER
6
6
7
7
using System . Threading ;
8
8
using System ;
Original file line number Diff line number Diff line change 57
57
<!--
58
58
Pack the source generator to the right package folders (each matching the target Roslyn version).
59
59
Roslyn will automatically load the highest version compatible with Roslyn's version in the SDK.
60
+ The Roslyn 4.3 target is copied to the 4.4 folder as a workaround for https://github.com/dotnet/roslyn/issues/63919.
60
61
-->
61
62
<None Include =" ..\CommunityToolkit.Mvvm.SourceGenerators.Roslyn401\bin\$(Configuration)\netstandard2.0\CommunityToolkit.Mvvm.SourceGenerators.dll" PackagePath =" analyzers\dotnet\roslyn4.0\cs" Pack =" true" Visible =" false" />
62
- <None Include =" ..\CommunityToolkit.Mvvm.SourceGenerators.Roslyn430\bin\$(Configuration)\netstandard2.0\CommunityToolkit.Mvvm.SourceGenerators.dll" PackagePath =" analyzers\dotnet\roslyn4.3 \cs" Pack =" true" Visible =" false" />
63
+ <None Include =" ..\CommunityToolkit.Mvvm.SourceGenerators.Roslyn430\bin\$(Configuration)\netstandard2.0\CommunityToolkit.Mvvm.SourceGenerators.dll" PackagePath =" analyzers\dotnet\roslyn4.4 \cs" Pack =" true" Visible =" false" />
63
64
</ItemGroup >
64
65
65
66
</Project >
Original file line number Diff line number Diff line change 6
6
7
7
<ItemGroup >
8
8
<PackageReference Include =" Microsoft.CodeAnalysis.CSharp.Analyzer.Testing.MSTest" Version =" 1.1.1" />
9
- <PackageReference Include =" Microsoft.CodeAnalysis.CSharp.Workspaces" Version =" 4.3.0 " />
9
+ <PackageReference Include =" Microsoft.CodeAnalysis.CSharp.Workspaces" Version =" 4.4.0-1.final " />
10
10
<PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 17.3.1" />
11
11
<PackageReference Include =" MSTest.TestAdapter" Version =" 2.2.10" />
12
12
<PackageReference Include =" MSTest.TestFramework" Version =" 2.2.10" />
You can’t perform that action at this time.
0 commit comments