Fix .targets by adding prefixes to all properties and items

このコミットが含まれているのは:
Sergio Pedri committed 2022-06-21 16:38:37 +02:00
1 親 0ca0fe0260
コミット 06cb67e490
4ファイル変更
+27 -30

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

+4 -5
ファイルの表示
@@ -18,21 +18,20 @@
the same version) but Microsoft.Build.Tasks.CodeAnalysis.dll is where MSBuild loads the compiler tasks from so if
someone is getting creative with msbuild tasks/targets this is the "most correct" assembly to check. -->
<GetAssemblyIdentity AssemblyFiles="$([System.IO.Path]::Combine(`$([System.IO.Path]::GetDirectoryName($(CSharpCoreTargetsPath)))`,`Microsoft.Build.Tasks.CodeAnalysis.dll`))">
<Output TaskParameter="Assemblies" ItemName="CurrentCompilerAssemblyIdentity"/>
<Output TaskParameter="Assemblies" ItemName="ComputeSharpCoreCurrentCompilerAssemblyIdentity"/>
</GetAssemblyIdentity>
<PropertyGroup>
<!-- Transform the resulting item from GetAssemblyIdentity into a property representing its assembly version -->
<CurrentCompilerVersion>@(CurrentCompilerAssemblyIdentity->'%(Version)')</CurrentCompilerVersion>
<CurrentCompilerVersion Condition="'$(CurrentCompilerVersion)' != ''">$(CurrentCompilerVersion.Split(';')[0])</CurrentCompilerVersion>
<ComputeSharpCoreCurrentCompilerVersion>@(ComputeSharpCoreCurrentCompilerAssemblyIdentity->'%(Version)')</ComputeSharpCoreCurrentCompilerVersion>
<!-- The CurrentCompilerVersionIsNotNewEnough property can now be defined based on the Roslyn assembly version -->
<CurrentCompilerVersionIsNotNewEnough Condition="$([MSBuild]::VersionLessThan($(CurrentCompilerVersion), 4.2))">true</CurrentCompilerVersionIsNotNewEnough>
<ComputeSharpCoreCurrentCompilerVersionIsNotNewEnough Condition="$([MSBuild]::VersionLessThan($(ComputeSharpCoreCurrentCompilerVersion), 4.2))">true</ComputeSharpCoreCurrentCompilerVersionIsNotNewEnough>
</PropertyGroup>
<!-- If the Roslyn version is < 4.2, disable the source generators -->
<ItemGroup Condition ="'$(CurrentCompilerVersionIsNotNewEnough)' == 'true'">
<ItemGroup Condition ="'$(ComputeSharpCoreCurrentCompilerVersionIsNotNewEnough)' == 'true'">
<Analyzer Remove="@(_ComputeSharpCoreAnalyzer)"/>
</ItemGroup>
+5 -6
ファイルの表示
@@ -18,28 +18,27 @@
the same version) but Microsoft.Build.Tasks.CodeAnalysis.dll is where MSBuild loads the compiler tasks from so if
someone is getting creative with msbuild tasks/targets this is the "most correct" assembly to check. -->
<GetAssemblyIdentity AssemblyFiles="$([System.IO.Path]::Combine(`$([System.IO.Path]::GetDirectoryName($(CSharpCoreTargetsPath)))`,`Microsoft.Build.Tasks.CodeAnalysis.dll`))">
<Output TaskParameter="Assemblies" ItemName="CurrentCompilerAssemblyIdentity"/>
<Output TaskParameter="Assemblies" ItemName="ComputeSharpD2D1CurrentCompilerAssemblyIdentity"/>
</GetAssemblyIdentity>
<PropertyGroup>
<!-- Transform the resulting item from GetAssemblyIdentity into a property representing its assembly version -->
<CurrentCompilerVersion>@(CurrentCompilerAssemblyIdentity->'%(Version)')</CurrentCompilerVersion>
<CurrentCompilerVersion Condition="'$(CurrentCompilerVersion)' != ''">$(CurrentCompilerVersion.Split(';')[0])</CurrentCompilerVersion>
<ComputeSharpD2D1CurrentCompilerVersion>@(ComputeSharpD2D1CurrentCompilerAssemblyIdentity->'%(Version)')</ComputeSharpD2D1CurrentCompilerVersion>
<!-- The CurrentCompilerVersionIsNotNewEnough property can now be defined based on the Roslyn assembly version -->
<CurrentCompilerVersionIsNotNewEnough Condition="$([MSBuild]::VersionLessThan($(CurrentCompilerVersion), 4.2))">true</CurrentCompilerVersionIsNotNewEnough>
<ComputeSharpD2D1CurrentCompilerVersionIsNotNewEnough Condition="$([MSBuild]::VersionLessThan($(ComputeSharpD2D1CurrentCompilerVersion), 4.2))">true</ComputeSharpD2D1CurrentCompilerVersionIsNotNewEnough>
</PropertyGroup>
<!-- If the Roslyn version is < 4.2, disable the source generators -->
<ItemGroup Condition ="'$(CurrentCompilerVersionIsNotNewEnough)' == 'true'">
<ItemGroup Condition ="'$(ComputeSharpD2D1CurrentCompilerVersionIsNotNewEnough)' == 'true'">
<Analyzer Remove="@(_ComputeSharpD2D1Analyzer)"/>
</ItemGroup>
<!-- 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.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."/>
<Error Condition ="'$(ComputeSharpD2D1CurrentCompilerVersionIsNotNewEnough)' == '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 -->
+13 -13
ファイルの表示
@@ -7,44 +7,44 @@
<PropertyGroup>
<!-- PIX version (this needs to be kept in sync with the one in the .csproj) -->
<WinPixEventRuntimeVersion>winpixeventruntime.1.0.220124001</WinPixEventRuntimeVersion>
<ComputeSharpPixWinPixEventRuntimeVersion>winpixeventruntime.1.0.220124001</ComputeSharpPixWinPixEventRuntimeVersion>
<!-- Detect whether the target project is UWP-->
<ShouldUnpackUapPixNativeLibraries>false</ShouldUnpackUapPixNativeLibraries>
<ShouldUnpackUapPixNativeLibraries Condition="'$(TargetFrameworkIdentifier)' == 'UAP'">true</ShouldUnpackUapPixNativeLibraries>
<ComputeSharpPixShouldUnpackUapPixNativeLibraries>false</ComputeSharpPixShouldUnpackUapPixNativeLibraries>
<ComputeSharpPixShouldUnpackUapPixNativeLibraries Condition="'$(TargetFrameworkIdentifier)' == 'UAP'">true</ComputeSharpPixShouldUnpackUapPixNativeLibraries>
<!-- Detect the target project CPU architecture -->
<ShouldUnpackArm64PixNativeLibraries>false</ShouldUnpackArm64PixNativeLibraries>
<ShouldUnpackArm64PixNativeLibraries Condition="'$(Platform)' == 'arm64'">true</ShouldUnpackArm64PixNativeLibraries>
<ComputeSharpPixShouldUnpackArm64PixNativeLibraries>false</ComputeSharpPixShouldUnpackArm64PixNativeLibraries>
<ComputeSharpPixShouldUnpackArm64PixNativeLibraries Condition="'$(Platform)' == 'arm64'">true</ComputeSharpPixShouldUnpackArm64PixNativeLibraries>
</PropertyGroup>
<!-- Win32, x64 -->
<ItemGroup Condition="'$(ShouldUnpackUapPixNativeLibraries)' == 'False' AND '$(ShouldUnpackArm64PixNativeLibraries)' == 'False'">
<None Include="$(MSBuildThisFileDirectory)..\$(WinPixEventRuntimeVersion)\x64\WinPixEventRuntime.dll"
<ItemGroup Condition="'$(ComputeSharpPixShouldUnpackUapPixNativeLibraries)' == 'False' AND '$(ComputeSharpPixShouldUnpackArm64PixNativeLibraries)' == 'False'">
<None Include="$(MSBuildThisFileDirectory)..\$(ComputeSharpPixWinPixEventRuntimeVersion)\x64\WinPixEventRuntime.dll"
Link="WinPixEventRuntime.dll"
Visible="False"
CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<!-- Win32, arm64 -->
<ItemGroup Condition="'$(ShouldUnpackUapPixNativeLibraries)' == 'False' AND '$(ShouldUnpackArm64PixNativeLibraries)' == 'True'">
<None Include="$(MSBuildThisFileDirectory)..\$(WinPixEventRuntimeVersion)\arm64\WinPixEventRuntime.dll"
<ItemGroup Condition="'$(ComputeSharpPixShouldUnpackUapPixNativeLibraries)' == 'False' AND '$(ComputeSharpPixShouldUnpackArm64PixNativeLibraries)' == 'True'">
<None Include="$(MSBuildThisFileDirectory)..\$(ComputeSharpPixWinPixEventRuntimeVersion)\arm64\WinPixEventRuntime.dll"
Link="WinPixEventRuntime.dll"
Visible="False"
CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<!-- UWP, x64 -->
<ItemGroup Condition="'$(ShouldUnpackUapPixNativeLibraries)' == 'True' AND '$(ShouldUnpackArm64PixNativeLibraries)' == 'False'">
<None Include="$(MSBuildThisFileDirectory)..\$(WinPixEventRuntimeVersion)\x64\WinPixEventRuntime_UAP.dll"
<ItemGroup Condition="'$(ComputeSharpPixShouldUnpackUapPixNativeLibraries)' == 'True' AND '$(ComputeSharpPixShouldUnpackArm64PixNativeLibraries)' == 'False'">
<None Include="$(MSBuildThisFileDirectory)..\$(ComputeSharpPixWinPixEventRuntimeVersion)\x64\WinPixEventRuntime_UAP.dll"
Link="WinPixEventRuntime.dll"
Visible="False"
CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<!-- UWP, arm64 -->
<ItemGroup Condition="'$(ShouldUnpackUapPixNativeLibraries)' == 'True' AND '$(ShouldUnpackArm64PixNativeLibraries)' == 'True'">
<None Include="$(MSBuildThisFileDirectory)..\$(WinPixEventRuntimeVersion)\arm64\WinPixEventRuntime_UAP.dll"
<ItemGroup Condition="'$(ComputeSharpPixShouldUnpackUapPixNativeLibraries)' == 'True' AND '$(ComputeSharpPixShouldUnpackArm64PixNativeLibraries)' == 'True'">
<None Include="$(MSBuildThisFileDirectory)..\$(ComputeSharpPixWinPixEventRuntimeVersion)\arm64\WinPixEventRuntime_UAP.dll"
Link="WinPixEventRuntime.dll"
Visible="False"
CopyToOutputDirectory="PreserveNewest" />
+5 -6
ファイルの表示
@@ -18,28 +18,27 @@
the same version) but Microsoft.Build.Tasks.CodeAnalysis.dll is where MSBuild loads the compiler tasks from so if
someone is getting creative with msbuild tasks/targets this is the "most correct" assembly to check. -->
<GetAssemblyIdentity AssemblyFiles="$([System.IO.Path]::Combine(`$([System.IO.Path]::GetDirectoryName($(CSharpCoreTargetsPath)))`,`Microsoft.Build.Tasks.CodeAnalysis.dll`))">
<Output TaskParameter="Assemblies" ItemName="CurrentCompilerAssemblyIdentity"/>
<Output TaskParameter="Assemblies" ItemName="ComputeSharpCurrentCompilerAssemblyIdentity"/>
</GetAssemblyIdentity>
<PropertyGroup>
<!-- Transform the resulting item from GetAssemblyIdentity into a property representing its assembly version -->
<CurrentCompilerVersion>@(CurrentCompilerAssemblyIdentity->'%(Version)')</CurrentCompilerVersion>
<CurrentCompilerVersion Condition="'$(CurrentCompilerVersion)' != ''">$(CurrentCompilerVersion.Split(';')[0])</CurrentCompilerVersion>
<ComputeSharpCurrentCompilerVersion>@(ComputeSharpCurrentCompilerAssemblyIdentity->'%(Version)')</ComputeSharpCurrentCompilerVersion>
<!-- The CurrentCompilerVersionIsNotNewEnough property can now be defined based on the Roslyn assembly version -->
<CurrentCompilerVersionIsNotNewEnough Condition="$([MSBuild]::VersionLessThan($(CurrentCompilerVersion), 4.2))">true</CurrentCompilerVersionIsNotNewEnough>
<ComputeSharpCurrentCompilerVersionIsNotNewEnough Condition="$([MSBuild]::VersionLessThan($(ComputeSharpCurrentCompilerVersion), 4.2))">true</ComputeSharpCurrentCompilerVersionIsNotNewEnough>
</PropertyGroup>
<!-- If the Roslyn version is < 4.2, disable the source generators -->
<ItemGroup Condition ="'$(CurrentCompilerVersionIsNotNewEnough)' == 'true'">
<ItemGroup Condition ="'$(ComputeSharpCurrentCompilerVersionIsNotNewEnough)' == 'true'">
<Analyzer Remove="@(_ComputeSharpAnalyzer)"/>
</ItemGroup>
<!-- 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.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."/>
<Error Condition ="'$(ComputeSharpCurrentCompilerVersionIsNotNewEnough)' == '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 -->