Skip to content

Commit

Permalink
Allow the command line app to roll forward to .NET 9 runtime
Browse files Browse the repository at this point in the history
Motivation
----------
It's possible for a system running a build to have only the .NET 9 SDK
installed, without the .NET 8 runtime. In this case, setting environment
variables to force a roll forward to .NET 9 is required.

Modifications
-------------
Set the roll forward configuration to Major in the command line app's
runtimeconfig.json.

Results
-------
SDK-style builds will now automatically roll forward to the .NET 9
runtime to run Yardarm if the .NET 8 runtime is unavailable. For best
compatibility, the .NET 8 runtime is still prefered if present.
  • Loading branch information
brantburnett committed Nov 29, 2024
1 parent 30cb61e commit f91c795
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/main/Yardarm.CommandLine/Yardarm.CommandLine.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifiers>win-x64;linux-x64</RuntimeIdentifiers>

<!--
If .NET 8 isn't installed, allow the command line tool to run on newer frameworks.
This may not always work, but provides better compatibility. This option still prefers
to use the .NET 8 runtime as specified in TargetFramework above, and only uses a newer
runtime if .NET 8 isn't available.
-->
<RollForward>Major</RollForward>

<!--
Since we are highly parallelized and doing a lot of SyntaxNode heap allocations, for multicore
machines we can get fewer GC pauses by using server GC. This is a good default for this project.
Expand Down

0 comments on commit f91c795

Please sign in to comment.