Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot enable Major version roll-forward for 2.x apps

See original GitHub issue

Steps to reproduce

I attempted to enable major-version roll-forward for the dotnetsay .NET Core tool.

I added <RollForward>LatestMajor</RollForward> within the PropertyGroup. I get this error:

C:\git\core\samples\dotnetsay>dotnet build
Microsoft (R) Build Engine version 16.3.0-preview-19377-01+dd8019d9e for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  Restore completed in 131.58 ms for C:\git\core\samples\dotnetsay\dotnetsay.csproj.
  You are using a preview version of .NET Core. See:
C:\Program Files\dotnet\sdk\3.0.100-preview8-013656\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(221,5): error NETSDK1103: RollForward setting is only supported on .NET Core 3.0 or higher. [C:\git\core\samples\dotnetsay\dotnetsay.csproj]


Expected behavior

I understand why RollForward isn’t enabled in general for 2.x since the feature is new in 3.0. We should special-case the LatestMajor value to enable it to be used. It is an important scenario for enabling 3.0 users (on 3.x-only machines) to use 2.x tools.

The only other option to enable 2.x tools to run on 3.x is to multi-target. I’m not a fan of that being the only option (in the case you are only doing it for this scenario and not taking advantage of 3.x APIs).


Please consider for 3.0.

/cc @vitek-karas @livarcocc @KathleenDollard

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

vitek-karascommented, Aug 14, 2019

I think we should enable it for both Major and LatestMajor - the global tools may want LatestMajor but I think even Major would make sense as well.

vitek-karascommented, Aug 22, 2019

Fixed by dotnet/sdk#3542

Read more comments on GitHub >

github_iconTop Results From Across the Web

Exploring the new rollForward and allowPrerelease ...
In this post I explore the new rollForward and allowPrerelease settings added to the global.json file in .NET Core 3.0 and how they...
Read more >
Started to get "This project is targeting a version of .NET ...
I'm getting this same issue with ASP.Net Core 3.1. The solution has been fine for two years and now it want's to install...
Read more >
Running .NET Core Apps on a Framework other than ...
Any application's runtime target version that is higher than the installed runtime version (major, minor or patch) does not run.
Read more >
Troubleshoot app launch failures
Configure roll-forward behavior​​ By default, an application requires a framework that matches the same major version that the application ...
Read more >
dotnet tool - It was not possible to find any compatible ...
That doesn't work and I get the following error: It was not possible to find any compatible framework version The framework 'Microsoft.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found