Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/linker.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViktor Hofer <viktor.hofer@microsoft.com>2021-02-26 15:59:04 +0300
committerGitHub <noreply@github.com>2021-02-26 15:59:04 +0300
commit0c4902a114192fce1e7570d998e70d24669e9cc3 (patch)
treea0042a67c2c71c1c8a82b263f88c01701b2f634c
parent44907d98e524f65db0a0edc2cab8afe077ba812a (diff)
Don't override the ILLinkTaskAssembly in the SDK (#1850)
-rw-r--r--src/ILLink.Tasks/ILLink.Tasks.csproj2
-rw-r--r--src/ILLink.Tasks/build/Microsoft.NET.ILLink.Tasks.props1
-rw-r--r--src/ILLink.Tasks/build/Microsoft.NET.ILLink.Tasks.targets9
-rw-r--r--src/ILLink.Tasks/sdk/Sdk.props3
4 files changed, 13 insertions, 2 deletions
diff --git a/src/ILLink.Tasks/ILLink.Tasks.csproj b/src/ILLink.Tasks/ILLink.Tasks.csproj
index 78ebf92ba..f2d002ce2 100644
--- a/src/ILLink.Tasks/ILLink.Tasks.csproj
+++ b/src/ILLink.Tasks/ILLink.Tasks.csproj
@@ -31,7 +31,7 @@
<ItemGroup>
<Content Include="sdk/Sdk.props" PackagePath="Sdk/" />
- <Content Include="build/$(PackageId).props" PackagePath="build/" />
+ <Content Include="build/$(PackageId).*" PackagePath="build/" />
</ItemGroup>
<ItemGroup>
diff --git a/src/ILLink.Tasks/build/Microsoft.NET.ILLink.Tasks.props b/src/ILLink.Tasks/build/Microsoft.NET.ILLink.Tasks.props
index eab8af1b5..bf9e8ccda 100644
--- a/src/ILLink.Tasks/build/Microsoft.NET.ILLink.Tasks.props
+++ b/src/ILLink.Tasks/build/Microsoft.NET.ILLink.Tasks.props
@@ -12,6 +12,7 @@ Copyright (c) .NET Foundation. All rights reserved.
<Project>
<PropertyGroup>
+ <UsingILLinkTasksSdk>true</UsingILLinkTasksSdk>
<ILLinkTasksAssembly Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net5.0\ILLink.Tasks.dll</ILLinkTasksAssembly>
<ILLinkTasksAssembly Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\ILLink.Tasks.dll</ILLinkTasksAssembly>
</PropertyGroup>
diff --git a/src/ILLink.Tasks/build/Microsoft.NET.ILLink.Tasks.targets b/src/ILLink.Tasks/build/Microsoft.NET.ILLink.Tasks.targets
new file mode 100644
index 000000000..3f7482188
--- /dev/null
+++ b/src/ILLink.Tasks/build/Microsoft.NET.ILLink.Tasks.targets
@@ -0,0 +1,9 @@
+<!-- TODO: Remove this file after the SDK consumes a new ILLink.Tasks package and dotnet/runtime consumes that newer SDK. -->
+<Project>
+
+ <PropertyGroup>
+ <ILLinkTasksAssembly Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net5.0\ILLink.Tasks.dll</ILLinkTasksAssembly>
+ <ILLinkTasksAssembly Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\ILLink.Tasks.dll</ILLinkTasksAssembly>
+ </PropertyGroup>
+
+</Project>
diff --git a/src/ILLink.Tasks/sdk/Sdk.props b/src/ILLink.Tasks/sdk/Sdk.props
index 503405e65..2f9f5ef66 100644
--- a/src/ILLink.Tasks/sdk/Sdk.props
+++ b/src/ILLink.Tasks/sdk/Sdk.props
@@ -11,6 +11,7 @@ Copyright (c) .NET Foundation. All rights reserved.
-->
<Project>
- <Import Project="$(MSBuildThisFileDirectory)..\build\Microsoft.NET.ILLink.Tasks.props" />
+ <!-- Only import the build props if the ILLink.Tasks package isn't referenced via NuGet. -->
+ <Import Project="$(MSBuildThisFileDirectory)..\build\Microsoft.NET.ILLink.Tasks.props" Condition="'$(UsingILLinkTasksSdk)' != 'true'" />
</Project>