Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Upgrade linker TFM to net6.0 (#1996)" #2000

Merged
merged 1 commit into from
Apr 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<PropertyGroup>
<RunAnalyzers>true</RunAnalyzers>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>
8 changes: 4 additions & 4 deletions src/ILLink.Tasks/ILLink.Tasks.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- Keep these in sync with ILLinkTasksAssembly in Microsoft.NET.ILLink.Tasks.props. -->
<!-- Keep the net5+ TFM in sync with the Mono.Linker.csproj condition below. -->
<TargetFrameworks>net6.0;net472</TargetFrameworks>
<!-- Keep these in sync with _ILLinkTasksTFM in Sdk.props. -->
<!-- Keep the netcoreapp TFM in sync with the Mono.Linker.csproj condition below. -->
<TargetFrameworks>net5.0;net472</TargetFrameworks>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<Description>MSBuild tasks for running the IL Linker</Description>
<IsPackable>true</IsPackable>
Expand Down Expand Up @@ -35,7 +35,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="../linker/Mono.Linker.csproj" PrivateAssets="All" Condition=" '$(TargetFramework)' == 'net6.0' " />
<ProjectReference Include="../linker/Mono.Linker.csproj" PrivateAssets="All" Condition=" '$(TargetFramework)' == 'net5.0' " />
<PackageReference Condition="'$(UseCecilPackage)' == 'true'" Include="Mono.Cecil" Version="$(MonoCecilVersion)" PrivateAssets="All" Publish="True" />
<ProjectReference Condition="'$(UseCecilPackage)' != 'true'" Include="../../external/cecil/Mono.Cecil.csproj" PrivateAssets="All">
<!-- https://github.com/dotnet/sdk/issues/2280#issuecomment-392815466 -->
Expand Down
2 changes: 1 addition & 1 deletion src/ILLink.Tasks/LinkTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ public string ILLinkPath {

var taskDirectory = Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location);
// The linker always runs on .NET Core, even when using desktop MSBuild to host ILLink.Tasks.
_illinkPath = Path.Combine (Path.GetDirectoryName (taskDirectory), "net6.0", "illink.dll");
_illinkPath = Path.Combine (Path.GetDirectoryName (taskDirectory), "net5.0", "illink.dll");
return _illinkPath;
}
set => _illinkPath = value;
Expand Down
2 changes: 1 addition & 1 deletion src/ILLink.Tasks/build/Microsoft.NET.ILLink.Tasks.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Copyright (c) .NET Foundation. All rights reserved.

<PropertyGroup>
<UsingILLinkTasksSdk>true</UsingILLinkTasksSdk>
<ILLinkTasksAssembly Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net6.0\ILLink.Tasks.dll</ILLinkTasksAssembly>
<ILLinkTasksAssembly Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net5.0\ILLink.Tasks.dll</ILLinkTasksAssembly>
<ILLinkTasksAssembly Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\ILLink.Tasks.dll</ILLinkTasksAssembly>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/ILLink.Tasks/build/Microsoft.NET.ILLink.Tasks.targets
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project>

<PropertyGroup>
<ILLinkTasksAssembly Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net6.0\ILLink.Tasks.dll</ILLinkTasksAssembly>
<ILLinkTasksAssembly Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net5.0\ILLink.Tasks.dll</ILLinkTasksAssembly>
<ILLinkTasksAssembly Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\ILLink.Tasks.dll</ILLinkTasksAssembly>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion test/Mono.Linker.Tests/TestCasesRunner/TestCaseSandbox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class TestCaseSandbox

static NPath GetArtifactsTestPath ()
{
// Converts paths like /root-folder/linker/artifacts/bin/Mono.Linker.Tests/Debug/net6.0/illink.dll
// Converts paths like /root-folder/linker/artifacts/bin/Mono.Linker.Tests/Debug/net5.0/illink.dll
// to /root-folder/linker/artifacts/testcases/
string artifacts = Path.GetFullPath (Path.Combine (Path.GetDirectoryName (_linkerAssemblyPath), "..", "..", "..", ".."));
string tests = Path.Combine (artifacts, "testcases");
Expand Down