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

[main] Upgrade netcoreapp3.1 TFMs to net7.0 #9127

Merged
merged 26 commits into from
Jun 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
510f582
retarget arcade projects to net7.0 tfm
lbussell Apr 19, 2022
9d4bd2b
don't build net472 version of Build.Tasks.Workloads during source build
lbussell Apr 20, 2022
bc91aae
fix incorrect 7.0 tfm
lbussell Apr 20, 2022
b8236d1
updates from code review
lbussell Apr 21, 2022
49e11af
add another possible arcade logging directory (for source build)
lbussell Apr 25, 2022
1db4d43
update to net7.0 preview 3
lbussell Apr 25, 2022
0d9dcdc
Revert "add another possible arcade logging directory (for source bui…
lbussell Apr 25, 2022
b65afc0
change initialize build tool framework to net7.0
lbussell Apr 25, 2022
f6af788
also change build tool framework in tools ps script
lbussell Apr 25, 2022
b88968b
Merge remote-tracking branch 'upstream/main' into net7.0-tfm
lbussell Apr 26, 2022
f87cc56
more updates to 7.0 preview 3
lbussell Apr 26, 2022
d46523a
Revert "more updates to 7.0 preview 3"
lbussell Apr 27, 2022
ef51e04
Revert "update to net7.0 preview 3"
lbussell Apr 27, 2022
d262b23
use TargetFrameworkForNETSDK to standardize TFM across projects
lbussell Apr 28, 2022
08c7848
Refine TargetFrameworkForNETSDK usage.
lbussell Apr 29, 2022
2e1ec30
Remove target that changed hardcoded TFM paths
lbussell May 5, 2022
3350777
Simplify TFM condition for CopyLocalLockFileAssemblies
lbussell May 6, 2022
3448629
Remove unnecessary comment about workaround
lbussell May 6, 2022
9627a60
Merge remote-tracking branch 'upstream/main' into net7.0-tfm
lbussell May 6, 2022
5200224
Hardcode more target framework values
lbussell May 20, 2022
a881adf
Merge branch 'main' into net7.0-tfm
lbussell May 25, 2022
a39a29f
Revert MaestroTasks hardcoded path
lbussell Jun 1, 2022
9073eb7
Add comment for Maestro.Tasks assembly reference
lbussell Jun 7, 2022
2a9d198
Reference net7.0 version of Build.Tasks.Workloads assembly if it exists
lbussell Jun 7, 2022
d0090ab
Simplify BuildTasksWorkloads assembly references
lbussell Jun 13, 2022
b5794ff
Merge remote-tracking branch 'upstream/main' into net7.0-tfm
lbussell Jun 16, 2022
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
35 changes: 0 additions & 35 deletions eng/SourceBuild.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,4 @@
<SourceBuildManagedOnly>true</SourceBuildManagedOnly>
</PropertyGroup>

<Import Project="TargetFrameworkDefaults.props" />

<!--
Some MSBuild files in this repo are copied as-is into the outputs, and contain hard-coded target
framework names. For the Microsoft build, the target framework rarely (never?) changes, so it
hasn't been a maintenance problem. However, it is a problem for source-build, where the TFM
needs to match the target/latest SDK (5.0, 6.0, ...). This target simply replaces the content of
the files. This is similar to a patch, but a little more resistant to merge conflicts.

This target should be removed, and the files should be generated by a template instead. Source
files should not be made dirty (according to Git) by running a build. This is partially
mitigated by the arcade-powered source-build tooling running the build in an isolated clone of
the repo rather than in the dev's copy.
-->
<Target Name="ModifyHardCodedTargetFrameworkReferencesInToolMSBuildFiles"
Condition="
'$(ArcadeBuildFromSource)' == 'true' and
'$(ArcadeInnerBuildFromSource)' == 'true'"
BeforeTargets="Execute">
<ItemGroup>
<ToolMSBuildFileUsingTargetFramework Include="
$(RepoRoot)src/Microsoft.DotNet.Arcade.Sdk/tools/BuildTasks.props;
$(RepoRoot)src/Microsoft.DotNet.Build.Tasks.Installers/build/Microsoft.DotNet.Build.Tasks.Installers.props;
$(RepoRoot)src/Microsoft.DotNet.Build.Tasks.Packaging/src/build/Packaging.common.targets;
$(RepoRoot)src/Microsoft.DotNet.Build.Tasks.TargetFramework/src/build/Microsoft.DotNet.Build.Tasks.TargetFramework.props;
$(RepoRoot)src/Microsoft.DotNet.GenFacades/build/Microsoft.DotNet.GenFacades.targets;
$(RepoRoot)src/Microsoft.DotNet.SourceBuild/tasks/build/Microsoft.DotNet.SourceBuild.Tasks.props" />
</ItemGroup>

<Exec
Command="sed -i 's/netcoreapp3.1/$(TargetFrameworkForNETSDK)/g' '%(ToolMSBuildFileUsingTargetFramework.FullPath)'"
WorkingDirectory="$(RepoRoot)"
Condition="'@(ToolMSBuildFileUsingTargetFramework)' != ''" />
</Target>

</Project>
7 changes: 1 addition & 6 deletions eng/TargetFrameworkDefaults.props
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
<Project>

<!--
By default, build for an old TFM for wide applicability. When running source-build, target the
current .NET SDK framework version to avoid dependency challenges.
-->
<PropertyGroup>
<TargetFrameworkForNETSDK>netcoreapp3.1</TargetFrameworkForNETSDK>
<TargetFrameworkForNETSDK Condition="'$(DotNetBuildFromSource)' == 'true'">net6.0</TargetFrameworkForNETSDK>
<TargetFrameworkForNETSDK>net7.0</TargetFrameworkForNETSDK>
</PropertyGroup>

</Project>
2 changes: 1 addition & 1 deletion eng/common/tools.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ function InitializeBuildTool() {
ExitWithExitCode 1
}
$dotnetPath = Join-Path $dotnetRoot (GetExecutableFileName 'dotnet')
$buildTool = @{ Path = $dotnetPath; Command = 'msbuild'; Tool = 'dotnet'; Framework = 'netcoreapp3.1' }
$buildTool = @{ Path = $dotnetPath; Command = 'msbuild'; Tool = 'dotnet'; Framework = 'net7.0' }
} elseif ($msbuildEngine -eq "vs") {
try {
$msbuildPath = InitializeVisualStudioMSBuild -install:$restore
Expand Down
2 changes: 1 addition & 1 deletion eng/common/tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ function InitializeBuildTool {
# return values
_InitializeBuildTool="$_InitializeDotNetCli/dotnet"
_InitializeBuildToolCommand="msbuild"
_InitializeBuildToolFramework="netcoreapp3.1"
_InitializeBuildToolFramework="net7.0"
}

# Set RestoreNoCache as a workaround for https://github.com/NuGet/Home/issues/3116
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>$(TargetFrameworkForNETSDK)</TargetFramework>
<Nullable>enable</Nullable>
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

<PropertyGroup>
<TargetFrameworks>net472;netstandard2.0</TargetFrameworks>
<TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">netstandard2.0</TargetFrameworks>
<IsPackable>true</IsPackable>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net472</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworkForNETSDK);net472</TargetFrameworks>
<IsTestProject>true</IsTestProject>
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net472;$(TargetFrameworkForNETSDK)</TargetFrameworks>
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks>
<CopyLocalLockFileAssemblies Condition="'$(TargetFramework)' == 'netcoreapp3.1'">true</CopyLocalLockFileAssemblies>
<TargetFrameworks>net472;$(TargetFrameworkForNETSDK)</TargetFrameworks>
<CopyLocalLockFileAssemblies Condition="'$(TargetFramework)' == '$(TargetFrameworkForNETSDK)'">true</CopyLocalLockFileAssemblies>
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
<IncludeBuildOutput>false</IncludeBuildOutput>
<PackageType>MSBuildSdk</PackageType>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
<Project>
<PropertyGroup>
<ApiCompatAssembly Condition="'$(MSBuildRuntimeType)' == 'core'">$(MSBuildThisFileDirectory)..\tools\netcoreapp3.1\Microsoft.DotNet.ApiCompat.dll</ApiCompatAssembly>
<ApiCompatAssembly Condition="'$(MSBuildRuntimeType)' == 'core'">$(MSBuildThisFileDirectory)..\tools\net7.0\Microsoft.DotNet.ApiCompat.dll</ApiCompatAssembly>
<ApiCompatAssembly Condition="'$(MSBuildRuntimeType)' != 'core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.DotNet.ApiCompat.exe</ApiCompatAssembly>

<!-- By default, run API Compat if this package is referenced. -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net472</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworkForNETSDK);net472</TargetFrameworks>
<LangVersion>Latest</LangVersion>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>$(TargetFrameworkForNETSDK)</TargetFramework>
<DefaultItemExcludes>$(DefaultItemExcludes);testassets\**\*</DefaultItemExcludes>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net472;$(TargetFrameworkForNETSDK)</TargetFrameworks>
<TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">$(TargetFrameworkForNETSDK)</TargetFrameworks>
<LangVersion>preview</LangVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<ExcludeFromSourceBuild>false</ExcludeFromSourceBuild>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project>
<PropertyGroup>
<_NuGetRepackAssembly Condition="'$(MSBuildRuntimeType)' != 'Core'">$(NuGetPackageRoot)microsoft.dotnet.nugetrepack.tasks\$(MicrosoftDotnetNuGetRepackTasksVersion)\tools\net472\Microsoft.DotNet.NuGetRepack.Tasks.dll</_NuGetRepackAssembly>
<_NuGetRepackAssembly Condition="'$(MSBuildRuntimeType)' == 'Core'">$(NuGetPackageRoot)microsoft.dotnet.nugetrepack.tasks\$(MicrosoftDotnetNuGetRepackTasksVersion)\tools\netcoreapp3.1\Microsoft.DotNet.NuGetRepack.Tasks.dll</_NuGetRepackAssembly>
<_NuGetRepackAssembly Condition="'$(MSBuildRuntimeType)' == 'Core'">$(NuGetPackageRoot)microsoft.dotnet.nugetrepack.tasks\$(MicrosoftDotnetNuGetRepackTasksVersion)\tools\net7.0\Microsoft.DotNet.NuGetRepack.Tasks.dll</_NuGetRepackAssembly>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unsure who owns nugetrepack. @mmitche this will probably not work until microsoft.dotnet.nugetrepack.tasks is updated after this PR is merged and the newer package is available.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also it's weird that something outside the package hardcodes the path to the assemblies inside the package. Ideally the microsoft.dotnet.nugetrepack.tasks package would contain an msbuild file that already sets this property (as we do in all our other task projects in arcade).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ViktorHofer Not sure who owns nuget repack either. My guess with the properties is just that this is an older-style and an oversight,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this change in fsharp, which I know uses NuGetRepack, and it does work. See here for my build of fsharp (internal MS link): https://dev.azure.com/dnceng/internal/_build/results?buildId=1829578&view=results. The windows failure is an unrelated, known issue: https://github.com/microsoft/dropvalidator/issues/455

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this should work. My comment was referring to that ideally this code would reside in the package itself and not in the consumer's path. We should look at this in a follow-up.

</PropertyGroup>

<UsingTask TaskName="Microsoft.DotNet.Tools.UpdatePackageVersionTask" AssemblyFile="$(_NuGetRepackAssembly)" />
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.DotNet.Arcade.Sdk/tools/BuildTasks.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<Project>
<PropertyGroup>
<ArcadeSdkBuildTasksAssembly Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)net472\Microsoft.DotNet.Arcade.Sdk.dll</ArcadeSdkBuildTasksAssembly>
<ArcadeSdkBuildTasksAssembly Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)netcoreapp3.1\Microsoft.DotNet.Arcade.Sdk.dll</ArcadeSdkBuildTasksAssembly>
<ArcadeSdkBuildTasksAssembly Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)net7.0\Microsoft.DotNet.Arcade.Sdk.dll</ArcadeSdkBuildTasksAssembly>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
-->

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<NETCORE_ENGINEERING_TELEMETRY>Publish</NETCORE_ENGINEERING_TELEMETRY>

<!-- Default publishing infra target is 3. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
</ItemGroup>

<PropertyGroup>
<!-- Microsoft.DotNet.Maestro.Tasks is produced from arcade-services, which should always target an LTS TFM -->
<_MicrosoftDotNetMaestroTasksBaseDir>$(NuGetPackageRoot)microsoft.dotnet.maestro.tasks\$(MicrosoftDotNetMaestroTasksVersion)\tools\</_MicrosoftDotNetMaestroTasksBaseDir>
<_MicrosoftDotNetMaestroTasksDir>$(_MicrosoftDotNetMaestroTasksBaseDir)net472</_MicrosoftDotNetMaestroTasksDir>
<_MicrosoftDotNetMaestroTasksDir Condition="'$(MSBuildRuntimeType)' == 'Core'">$(_MicrosoftDotNetMaestroTasksBaseDir)netcoreapp3.1</_MicrosoftDotNetMaestroTasksDir>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<PropertyGroup>
<NETCORE_ENGINEERING_TELEMETRY>Publish</NETCORE_ENGINEERING_TELEMETRY>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>

<!--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
-->

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<NETCORE_ENGINEERING_TELEMETRY>Publish</NETCORE_ENGINEERING_TELEMETRY>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<Import Condition="Exists('$(BuildManifestFile)')" Project="$(BuildManifestFile)" />

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<NETCORE_ENGINEERING_TELEMETRY>Build</NETCORE_ENGINEERING_TELEMETRY>
<SignCheckTaskAssembly>$(NuGetPackageRoot)Microsoft.DotNet.SignCheck\$(MicrosoftDotNetSignCheckVersion)\tools\Microsoft.DotNet.SignCheck.exe</SignCheckTaskAssembly>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<!-- Most of the code has been ported from https://devdiv.visualstudio.com/DevDiv/_git/CoreFxTools repo.-->
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworkForNETSDK)</TargetFrameworks>
<IsPackable>true</IsPackable>
<PackAsTool>true</PackAsTool>
<ToolCommandName>dotnet-asmdiff</ToolCommandName>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworkForNETSDK)</TargetFrameworks>
<ExcludeFromSourceBuild>false</ExcludeFromSourceBuild>

<IsPackable>true</IsPackable>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworkForNETSDK)</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net472</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworkForNETSDK);net472</TargetFrameworks>
<SignAssembly>true</SignAssembly>

<Description>This package provides support for publishing assets to a NuGet protocol based feed.</Description>
<DevelopmentDependency>true</DevelopmentDependency>
<PackageType>MSBuildSdk</PackageType>
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
<_ExcludeNuGetAssembliesTargetFramework>netcoreapp3.1</_ExcludeNuGetAssembliesTargetFramework>
<_ExcludeNuGetAssembliesTargetFramework>$(TargetFrameworkForNETSDK)</_ExcludeNuGetAssembliesTargetFramework>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that this property and the target at the bottom of the project file aren't required anymore based on the underlying msbuild issue already being fixed. That said, this might be a good follow-up investigation, unrelated to this PR.

</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

<PropertyGroup>
<_MicrosoftDotNetBuildTasksFeedTaskDir>$(MSBuildThisFileDirectory)../tools/net472/</_MicrosoftDotNetBuildTasksFeedTaskDir>
<_MicrosoftDotNetBuildTasksFeedTaskDir Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)../tools/netcoreapp3.1/</_MicrosoftDotNetBuildTasksFeedTaskDir>
<_MicrosoftDotNetBuildTasksFeedTaskDir Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)../tools/net7.0/</_MicrosoftDotNetBuildTasksFeedTaskDir>
</PropertyGroup>
<UsingTask TaskName="ConfigureInputFeeds" AssemblyFile="$(_MicrosoftDotNetBuildTasksFeedTaskDir)Microsoft.DotNet.Build.Tasks.Feed.dll"/>
<UsingTask TaskName="CopyBlobDirectory" AssemblyFile="$(_MicrosoftDotNetBuildTasksFeedTaskDir)Microsoft.DotNet.Build.Tasks.Feed.dll"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net472;$(TargetFrameworkForNETSDK)</TargetFrameworks>
<TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">$(TargetFrameworkForNETSDK)</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>Latest</LangVersion>
<IsPackable>true</IsPackable>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MicrosoftDotNetBuildTasksInstallersTaskAssembly Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\netcoreapp3.1\Microsoft.DotNet.Build.Tasks.Installers.dll</MicrosoftDotNetBuildTasksInstallersTaskAssembly>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried this change even with the preview 5 .NET 7 SDK and it still cant load 7.0.0 of System.Runtime for this task.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AraHaan can you please post or message to me privately a link to the failure you're describing?

<MicrosoftDotNetBuildTasksInstallersTaskAssembly Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net7.0\Microsoft.DotNet.Build.Tasks.Installers.dll</MicrosoftDotNetBuildTasksInstallersTaskAssembly>
<MicrosoftDotNetBuildTasksInstallersTaskAssembly Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.DotNet.Build.Tasks.Installers.dll</MicrosoftDotNetBuildTasksInstallersTaskAssembly>
<MicrosoftDotNetBuildTasksInstallersMSBuildDir Condition="'$(MicrosoftDotNetBuildTasksInstallersMSBuildDir)' == ''">$(MSBuildThisFileDirectory)</MicrosoftDotNetBuildTasksInstallersMSBuildDir>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

<PropertyGroup>
<TargetFrameworks>net472;$(TargetFrameworkForNETSDK)</TargetFrameworks>
<TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">$(TargetFrameworkForNETSDK)</TargetFrameworks>
<CopyLocalLockFileAssemblies Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'netcoreapp3.1'))">true</CopyLocalLockFileAssemblies>
<CopyLocalLockFileAssemblies Condition="'$(TargetFramework)' == '$(TargetFrameworkForNETSDK)'">true</CopyLocalLockFileAssemblies>
<PackageType>MSBuildSdk</PackageType>
<IncludeBuildOutput>false</IncludeBuildOutput>
<IsPackable>true</IsPackable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<PropertyGroup>
<PackagingTaskDir Condition="'$(PackagingTaskDir)' == '' AND '$(MSBuildRuntimeType)' == 'core'">$(MSBuildThisFileDirectory)../tools/netcoreapp3.1/</PackagingTaskDir>
<PackagingTaskDir Condition="'$(PackagingTaskDir)' == '' AND '$(MSBuildRuntimeType)' == 'core'">$(MSBuildThisFileDirectory)../tools/net7.0/</PackagingTaskDir>
<PackagingTaskDir Condition="'$(PackagingTaskDir)' == '' AND '$(MSBuildRuntimeType)' != 'core'">$(MSBuildThisFileDirectory)../tools/net472/</PackagingTaskDir>
<RuntimeIdGraphDefinitionFile Condition="'$(RuntimeIdGraphDefinitionFile)' == ''">$(MSBuildThisFileDirectory)runtime.json</RuntimeIdGraphDefinitionFile>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,10 @@
<DefaultValidateFramework Include="net6.0">
<RuntimeIDs>@(NETCoreApp60RIDs)</RuntimeIDs>
</DefaultValidateFramework>
<NETCoreApp70RIDs Condition="'@(NETCoreApp70RIDs)' == ''" Include="@(NETCoreApp60RIDs)" />
<DefaultValidateFramework Include="net7.0">
<RuntimeIDs>@(NETCoreApp70RIDs)</RuntimeIDs>
</DefaultValidateFramework>

<NETCore50RIDs Condition="'@(NETCore50RIDs)' == ''" Include="win10-x86;win10-x86-aot;win10-x64;win10-x64-aot;win10-arm;win10-arm-aot" />
<DefaultValidateFramework Include="netcore50">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net472</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworkForNETSDK);net472</TargetFrameworks>
<LangVersion>Latest</LangVersion>
<SignAssembly>false</SignAssembly>
<NoWarn>xUnit2013</NoWarn>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

<PropertyGroup>
<TargetFrameworks>net472;$(TargetFrameworkForNETSDK)</TargetFrameworks>
<TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">$(TargetFrameworkForNETSDK)</TargetFrameworks>
<CopyLocalLockFileAssemblies Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'netcoreapp3.1'))">true</CopyLocalLockFileAssemblies>
<CopyLocalLockFileAssemblies Condition="'$(TargetFramework)' == '$(TargetFrameworkForNETSDK)'">true</CopyLocalLockFileAssemblies>
<IncludeBuildOutput>false</IncludeBuildOutput>
<IsPackable>true</IsPackable>
<Title>Configuration system for cross-targeting projects.</Title>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. -->
<Project>
<PropertyGroup>
<DotNetBuildTasksTargetFrameworkAssembly Condition="'$(MSBuildRuntimeType)' == 'core'">..\tools\netcoreapp3.1\Microsoft.DotNet.Build.Tasks.TargetFramework.dll</DotNetBuildTasksTargetFrameworkAssembly>
<DotNetBuildTasksTargetFrameworkAssembly Condition="'$(MSBuildRuntimeType)' == 'core'">..\tools\net7.0\Microsoft.DotNet.Build.Tasks.TargetFramework.dll</DotNetBuildTasksTargetFrameworkAssembly>
<DotNetBuildTasksTargetFrameworkAssembly Condition="'$(MSBuildRuntimeType)' != 'core'">..\tools\net472\Microsoft.DotNet.Build.Tasks.TargetFramework.dll</DotNetBuildTasksTargetFrameworkAssembly>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net472;$(TargetFrameworkForNETSDK)</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net472;$(TargetFrameworkForNETSDK)</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">net6.0</TargetFrameworks>
<TargetFrameworks>net472;$(TargetFrameworkForNETSDK)</TargetFrameworks>
<!--
We can't build Microsoft.DotNet.Build.Tasks.Workloads for net472 in source build, since it
depends on Microsoft.NET.Sdk.WorkloadManifestReader, and the previously source built
version of that package is incompatible with the net472 TFM.
-->
<TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">$(TargetFrameworkForNETSDK)</TargetFrameworks>
ViktorHofer marked this conversation as resolved.
Show resolved Hide resolved
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IsPackable>true</IsPackable>
<Description>Workload pack installer generation task package</Description>
Expand Down
Loading