question-mark
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.

Roll-forward from 3.1 -> 6.0 fails

See original GitHub issue

I was playing with some 3.1 samples and trying to roll them forward to 6.0. That didn’t work. I’m unaware of a compatibility issue that would have caused this. If I run the 3.1 sample on the 3.1 runtime, it works. If I update the sample to target 6.0, then it similarly works. I tried this with multiple samples.

I know we made some changes during .NET 5 or 6 where we changed the way the GPIO library was packaged, particularly as it relates to Windows (although I’m on Linux).

I have three basic questions:

  • Is this compatibility issue known?
  • If so, is it documented?
  • Why does it show up as a failure to create CoreCLR?

Here is what I see:

rich@raspberrypi:~/iot/src/devices/ShiftRegister/samples $ dotnet bin/Debug/netcoreapp3.1/ShiftRegister-driver.dll
It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '3.1.0' (arm64) was not found.
  - The following frameworks were found:
      6.0.0 at [/home/rich/iot/.dotnet/shared/Microsoft.NETCore.App]
      6.0.2 at [/home/rich/iot/.dotnet/shared/Microsoft.NETCore.App]

You can resolve the problem by installing the specified framework and/or SDK.

The specified framework can be found at:
  - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=3.1.0&arch=arm64&rid=debian.11-arm64
rich@raspberrypi:~/iot/src/devices/ShiftRegister/samples $ dotnet --roll-forward Major bin/Debug/netcoreapp3.1/ShiftRegi
ster-driver.dll
Failed to create CoreCLR, HRESULT: 0x80070057
rich@raspberrypi:~/iot/src/devices/ShiftRegister/samples $ ~/.dotnet/dotnet bin/Debug/netcoreapp3.1/ShiftRegister-driver
.dll
Driver for ShiftRegister
Register bit length: 8
Using GPIO
Light up three of first four LEDs
Light up all LEDs, with ShiftBit
Dim up all LEDs, with ShiftBit
^CWrite a set of values with ShiftByte
Value: 1

Note: The dotnet in the path has just .NET 6. The .NET at /.dotnet has .NET Core 3.1 and .NET 6.

/cc @vitek-karas

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
vitek-karascommented, Apr 28, 2022

Yes, we removed winmd (WinRT) support in .NET 5 - intentionally.

0reactions
krwqcommented, Apr 28, 2022

[Triage] Thanks @vitek-karas in that case the compatibility problem is expected and new version of .NET IoT must be used. Closing the issue as by design.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Select which .NET version to use
Learn how .NET automatically finds and chooses runtime versions for your program. Additionally, this article teaches you how to force a ...
Read more >
rollForward (global.json / .NET Core) does not work
145, built on March 25, 2020). I just tried and I still get this error: Unable to locate .NET Core SDK 3.1 defined...
Read more >
Mention --roll-forward switch in error message when no ...
NET 5 to .NET 6 updates. I run a set of non-trivial dotnet tools like ILSpy, MSBuildStructuredLog viewer, and few others (command line...
Read more >
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 >
Unable to locate the .NET SDK as specified by global.json ...
In my case my global.json was referring to an SDK I didn't have. Run the below in your terminal dotnet --list-sdks.
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found