Update .targets files to check for Roslyn 4.2

このコミットが含まれているのは:
Sergio Pedri committed 2022-06-18 16:00:40 +02:00
1 親 3f086a0ee3
コミット f45ee3b97d
3ファイル変更
+11 -11

検索条件に一致するファイルはありません

+3 -3
ファイルの表示
@@ -7,7 +7,7 @@
</ItemGroup>
</Target>
<!-- Remove the analyzer if using Roslyn 3.x (incremental generators require Roslyn 4.x) -->
<!-- Remove the analyzer if using Roslyn < 4.2 (ComputeSharp.Core's generators require Roslyn 4.2) -->
<Target Name="_ComputeSharpCoreRemoveAnalyzersForRoslyn3"
Condition="'$(CSharpCoreTargetsPath)' != ''"
AfterTargets="ResolvePackageDependenciesForBuild;ResolveNuGetPackageAssets"
@@ -27,10 +27,10 @@
<CurrentCompilerVersion>@(CurrentCompilerAssemblyIdentity->'%(Version)')</CurrentCompilerVersion>
<!-- The CurrentCompilerVersionIsNotNewEnough property can now be defined based on the Roslyn assembly version -->
<CurrentCompilerVersionIsNotNewEnough Condition="$([MSBuild]::VersionLessThan($(CurrentCompilerVersion), 4.0))">true</CurrentCompilerVersionIsNotNewEnough>
<CurrentCompilerVersionIsNotNewEnough Condition="$([MSBuild]::VersionLessThan($(CurrentCompilerVersion), 4.2))">true</CurrentCompilerVersionIsNotNewEnough>
</PropertyGroup>
<!-- If the Roslyn version is < 4.0, disable the source generators -->
<!-- If the Roslyn version is < 4.2, disable the source generators -->
<ItemGroup Condition ="'$(CurrentCompilerVersionIsNotNewEnough)' == 'true'">
<Analyzer Remove="@(_ComputeSharpCoreAnalyzer)"/>
</ItemGroup>
+4 -4
ファイルの表示
@@ -7,7 +7,7 @@
</ItemGroup>
</Target>
<!-- Remove the analyzer if using Roslyn 3.x (incremental generators require Roslyn 4.x) -->
<!-- Remove the analyzer if using Roslyn < 4.2 (ComputeSharp.D2D1's generators require Roslyn 4.2) -->
<Target Name="_ComputeSharpD2D1RemoveAnalyzersForRoslyn3"
Condition="'$(CSharpCoreTargetsPath)' != ''"
AfterTargets="ResolvePackageDependenciesForBuild;ResolveNuGetPackageAssets"
@@ -27,10 +27,10 @@
<CurrentCompilerVersion>@(CurrentCompilerAssemblyIdentity->'%(Version)')</CurrentCompilerVersion>
<!-- The CurrentCompilerVersionIsNotNewEnough property can now be defined based on the Roslyn assembly version -->
<CurrentCompilerVersionIsNotNewEnough Condition="$([MSBuild]::VersionLessThan($(CurrentCompilerVersion), 4.0))">true</CurrentCompilerVersionIsNotNewEnough>
<CurrentCompilerVersionIsNotNewEnough Condition="$([MSBuild]::VersionLessThan($(CurrentCompilerVersion), 4.2))">true</CurrentCompilerVersionIsNotNewEnough>
</PropertyGroup>
<!-- If the Roslyn version is < 4.0, disable the source generators -->
<!-- If the Roslyn version is < 4.2, disable the source generators -->
<ItemGroup Condition ="'$(CurrentCompilerVersionIsNotNewEnough)' == 'true'">
<Analyzer Remove="@(_ComputeSharpD2D1Analyzer)"/>
</ItemGroup>
@@ -38,7 +38,7 @@
<!-- If the source generators are disabled, also emit an error. This would've been produced by MSBuild itself as well, but
emitting this manually lets us customize the message to inform developers as to why exactly the generators have been
disabled, and that ComputeSharp will not work at all unless a more up to date IDE or compiler version are used. -->
<Error Condition ="'$(CurrentCompilerVersionIsNotNewEnough)' == 'true'" Text="The ComputeSharp.D2D1 source generators have been disabled on the current configuration, as they need Roslyn 4.x in order to work. ComputeSharp.D2D1 requires the source generators to run in order to process shaders, so the library cannot be used without a more up to date IDE (eg. VS2022) or .NET SDK version."/>
<Error Condition ="'$(CurrentCompilerVersionIsNotNewEnough)' == 'true'" Text="The ComputeSharp.D2D1 source generators have been disabled on the current configuration, as they need Roslyn 4.2 in order to work. ComputeSharp.D2D1 requires the source generators to run in order to process shaders, so the library cannot be used without a more up to date IDE (eg. VS2022) or .NET SDK version."/>
</Target>
<!-- Remove the analyzer if Roslyn is missing -->
+4 -4
ファイルの表示
@@ -7,7 +7,7 @@
</ItemGroup>
</Target>
<!-- Remove the analyzer if using Roslyn 3.x (incremental generators require Roslyn 4.x) -->
<!-- Remove the analyzer if using Roslyn < 4.2 (ComputeSharp's generators require Roslyn 4.2) -->
<Target Name="_ComputeSharpRemoveAnalyzersForRoslyn3"
Condition="'$(CSharpCoreTargetsPath)' != ''"
AfterTargets="ResolvePackageDependenciesForBuild;ResolveNuGetPackageAssets"
@@ -27,10 +27,10 @@
<CurrentCompilerVersion>@(CurrentCompilerAssemblyIdentity->'%(Version)')</CurrentCompilerVersion>
<!-- The CurrentCompilerVersionIsNotNewEnough property can now be defined based on the Roslyn assembly version -->
<CurrentCompilerVersionIsNotNewEnough Condition="$([MSBuild]::VersionLessThan($(CurrentCompilerVersion), 4.0))">true</CurrentCompilerVersionIsNotNewEnough>
<CurrentCompilerVersionIsNotNewEnough Condition="$([MSBuild]::VersionLessThan($(CurrentCompilerVersion), 4.2))">true</CurrentCompilerVersionIsNotNewEnough>
</PropertyGroup>
<!-- If the Roslyn version is < 4.0, disable the source generators -->
<!-- If the Roslyn version is < 4.2, disable the source generators -->
<ItemGroup Condition ="'$(CurrentCompilerVersionIsNotNewEnough)' == 'true'">
<Analyzer Remove="@(_ComputeSharpAnalyzer)"/>
</ItemGroup>
@@ -38,7 +38,7 @@
<!-- If the source generators are disabled, also emit an error. This would've been produced by MSBuild itself as well, but
emitting this manually lets us customize the message to inform developers as to why exactly the generators have been
disabled, and that ComputeSharp will not work at all unless a more up to date IDE or compiler version are used. -->
<Error Condition ="'$(CurrentCompilerVersionIsNotNewEnough)' == 'true'" Text="The ComputeSharp source generators have been disabled on the current configuration, as they need Roslyn 4.x in order to work. ComputeSharp requires the source generators to run in order to process shaders, so the library cannot be used without a more up to date IDE (eg. VS2022) or .NET SDK version."/>
<Error Condition ="'$(CurrentCompilerVersionIsNotNewEnough)' == 'true'" Text="The ComputeSharp source generators have been disabled on the current configuration, as they need Roslyn 4.2 in order to work. ComputeSharp requires the source generators to run in order to process shaders, so the library cannot be used without a more up to date IDE (eg. VS2022) or .NET SDK version."/>
</Target>
<!-- Remove the analyzer if Roslyn is missing -->