Skip to content

Commit bdf5ebc

Browse files
brettfobaronfel
authored andcommitted
Enable roll forward in our .NET Core exes
This changes our build to mark all of our .NET Core applications as rolling forward on major / minor versions of the .NET framework. Presently our tools ship inside both .NET Core 2 and 3 SDKs. This setting allows our tools to run unmodified in both settings.
1 parent 90c1fb8 commit bdf5ebc

File tree

5 files changed

+21
-0
lines changed

5 files changed

+21
-0
lines changed

FSharpBuild.Directory.Build.targets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<Project>
22
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
3+
<Import Project="eng\targets\Imports.targets" />
34
<Import Project="eng\targets\NuGet.targets" />
45
<Import Project="eng\targets\NGenBinaries.targets" />
56
<Import Project="FSharp.Profiles.props" />

eng/Build.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,11 @@ try {
233233

234234
if ($ci) {
235235
Prepare-TempDir
236+
237+
# enable us to build netcoreapp2.1 binaries
238+
$global:_DotNetInstallDir = Join-Path $RepoRoot ".dotnet"
239+
InstallDotNetSdk $global:_DotNetInstallDir $GlobalJson.tools.dotnet
240+
InstallDotNetSdk $global:_DotNetInstallDir "2.1.503"
236241
}
237242

238243
if ($bootstrap) {

eng/build.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,9 @@ function BuildSolution {
237237

238238
InitializeDotNetCli $restore
239239

240+
# enable us to build netcoreapp2.1 binaries
241+
InstallDotNetSdk $_InitializeDotNetCli 2.1.503
242+
240243
BuildSolution
241244

242245
if [[ "$test_core_clr" == true ]]; then
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"rollForwardOnNoCandidateFx": 2
3+
}

eng/targets/Imports.targets

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<Project>
2+
<PropertyGroup>
3+
<!--
4+
When building a .NET Core exe make sure to include the template runtimeconfig.json file
5+
which has all of our global settings
6+
-->
7+
<UserRuntimeConfig Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND '$(OutputType)' == 'Exe'">$(RepositoryEngineeringDir)config\runtimeconfig.template.json</UserRuntimeConfig>
8+
</PropertyGroup>
9+
</Project>

0 commit comments

Comments
 (0)