Add 'Directory.Build.BeforeMicrosoftCommon.targets'
このコミットが含まれているのは:
1 親
ebef42bca3
コミット
44ce55a740
3ファイル変更
+31
検索条件に一致するファイルはありません
@@ -102,6 +102,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.Tests.GlobalSt
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B86A48A7-18BD-4946-B995-3CE26B092DDF}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
src\Directory.Build.BeforeMicrosoftCommon.targets = src\Directory.Build.BeforeMicrosoftCommon.targets
|
||||
src\Directory.Build.props = src\Directory.Build.props
|
||||
src\Directory.Build.targets = src\Directory.Build.targets
|
||||
EndProjectSection
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project>
|
||||
|
||||
<!-- Add a marker value to verify from a later .targets that this .targets has been correctly invoked -->
|
||||
<PropertyGroup>
|
||||
<_ComputeSharpCustomBeforeMicrosoftCommonTargetsValid>true</_ComputeSharpCustomBeforeMicrosoftCommonTargetsValid>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Import the original custom .targets, if it exists -->
|
||||
<Import Project="$(_ComputeSharpCustomBeforeMicrosoftCommonTargets)"
|
||||
Condition="'$(_ComputeSharpCustomBeforeMicrosoftCommonTargets)' != '' AND Exists('$(_ComputeSharpCustomBeforeMicrosoftCommonTargets)')"/>
|
||||
|
||||
<!-- Emit an error if our custom 'BeforeCommon' .targets file has not been invoked -->
|
||||
<Target Name="_ComputeSharpCheckForInvalidCustomBeforeMicrosoftCommonTargets"
|
||||
BeforeTargets="_CheckForInvalidConfigurationAndPlatform;CoreCompile">
|
||||
<Error Condition ="'$(_ComputeSharpCustomBeforeMicrosoftCommonTargetsValid)' != 'true'"
|
||||
Text="The '_ComputeSharpCustomBeforeMicrosoftCommonTargetsValid' marker property is not set."/>
|
||||
</Target>
|
||||
</Project>
|
||||
@@ -83,4 +83,15 @@
|
||||
<!-- Pack the license file, if present -->
|
||||
<None Condition="$(IsLicenseFileAvailableForPacking)" Include="LICENSE.txt" Pack="true" PackagePath="\" Visible="False" />
|
||||
</ItemGroup>
|
||||
|
||||
<!--
|
||||
Setup the custom .targets to run as 'CustomBeforeMicrosoftCommonTargets'. We also make a copy of the original value so
|
||||
that we can manually import it ourselves after ours. This is because we want to be able to read properties that are set
|
||||
in .csproj files, and set properties depending on those before the .NET SDK .targets are imported. This is necessary
|
||||
to ensure that the .NET tooling works correctly with some of them (eg. with 'IsAotCompatible').
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<_ComputeSharpCustomBeforeMicrosoftCommonTargets>$(CustomBeforeMicrosoftCommonTargets)</_ComputeSharpCustomBeforeMicrosoftCommonTargets>
|
||||
<CustomBeforeMicrosoftCommonTargets>$(MSBuildThisFileDirectory)Directory.Build.BeforeMicrosoftCommon.targets</CustomBeforeMicrosoftCommonTargets>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
新しいイシューから参照
ユーザーをブロックする