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

New .NET versions are not recognized (if there is a .NET version already installed) #31

Closed
andyld97 opened this issue Apr 10, 2022 · 5 comments
Labels
invalid This doesn't seem right

Comments

@andyld97
Copy link

Version

ver 2.2.0

Details

Hi!

I hope you're doing well!

Recently I figured out that if you have .NET 6.0.1 installed (for example), but your app requires .NET 6.0.2 then DotnetRuntimeBootstrapper won't install the new version and the app won't start.

I didn't found a solution to change the sub-version in VS, like you can only set net6.0-windows and if you install Visual Studio updates it may get increased automatically ...

But if you don't have .NET 6.0.x installed, it installs the newest version and everything works fine.

Steps to reproduce

You can test it with the Windows Sandbox (if you have it installed)

  1. Install .NET 6.0.1
  2. Start an app with DotnetRuntimeBootstrapper which is targetting .NET 6.0.2
@andyld97 andyld97 added the bug Something isn't working label Apr 10, 2022
@Tyrrrz
Copy link
Owner

Tyrrrz commented Apr 10, 2022

When you say the app is targeting .NET 6.0.2, what do you mean exactly? Does it say 6.0.2 anywhere in runsettings.json?

@andyld97
Copy link
Author

When you say the app is targeting .NET 6.0.2, what do you mean exactly?

Target is still net6.0-windows, I didn't changed it anywhere, but when I run it you can see it in the output:
... C:\Program Files\dotnet\shared\Microsoft.NETCore.App\6.0.2\System.Runtime.Numerics.dll ...

So, if 6.0.2 is installed on my VS machine, this version will be used for the application and if you are trying
to use it on another machine with 6.0.1 it won't work.

runtimeconfig.json looks like this:

{
  "runtimeOptions": {
    "tfm": "net6.0",
    "frameworks": [
      {
        "name": "Microsoft.NETCore.App",
        "version": "6.0.0"
      },
      {
        "name": "Microsoft.WindowsDesktop.App",
        "version": "6.0.0"
      }
    ]
  }
}

@Tyrrrz
Copy link
Owner

Tyrrrz commented Apr 10, 2022

Are you sure this is not related to this issue? dotnet/core#7176

As far as I know, .NET deployments are minor-agnostic.

@andyld97
Copy link
Author

Are you sure this is not related to this issue?

I think indeed it is related to that issue, but I didn't know that, I thought to fix this the latest release needs to be installed.

As far as I know, .NET deployments are minor-agnostic.

You're right, so it's not necessarily required to have the latest .NET version installed.
But anyway thanks for your help 👍

@Tyrrrz Tyrrrz added invalid This doesn't seem right and removed bug Something isn't working labels Apr 10, 2022
@Tyrrrz
Copy link
Owner

Tyrrrz commented Apr 10, 2022

No worries, I hit the same problem recently too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants