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

[NetCoreCheck] Provide a way to check a range of versions #108

Open
Deilan opened this issue Mar 9, 2021 · 3 comments
Open

[NetCoreCheck] Provide a way to check a range of versions #108

Deilan opened this issue Mar 9, 2021 · 3 comments
Assignees

Comments

@Deilan
Copy link

Deilan commented Mar 9, 2021

Currently NetCoreCheck could be used to check whether is specific version of runtime is installed.

Would be also convenient to check whether any version within provided range is installed, e.g.: 3.x, 3.1.x, >=3.0.0, >=5.0.0 < 5.1, etc.

@antonfirsov antonfirsov transferred this issue from dotnet/core Mar 9, 2021
@MSLukeWest MSLukeWest self-assigned this Apr 7, 2021
@MSLukeWest
Copy link
Contributor

MSLukeWest commented Apr 10, 2021

Currently NetCoreCheck could be used to check whether is specific version of runtime is installed.

@Deilan This is not entirely accurate. The point of NETCoreCheck is to answer the question "My app needs runtime x version y and (optionally) has roll-forward policy z, can it run on this machine?" So while this request is not exactly inline with the goals of NETCoreCheck, it can still answer all the questions posed above, for example (assuming requested framework is Windows Desktop):

  • 3.x NETCoreCheck.exe -n Microsoft.WindowsDesktop.App -v 3.x.0
  • 3.1.x NETCoreCheck.exe -n Microsoft.WindowsDesktop.App -v 3.1.0
  • >=3.0.0 NETCoreCheck.exe -n Microsoft.WindowsDesktop.App -v 3.0.0 -r LatestMajor
  • >=5.0.0 < 5.1 NETCoreCheck.exe -n Microsoft.WindowsDesktop.App -v 5.0.0 -r LatestPatch

Important Note: The version of NETCoreCheck that supports the roll-forward policy argument (#82) hasn't been published yet, meaning the third and fourth examples aren't yet possible without building NETCoreCheck yourself. I'll follow up on that and reply back here once it's done.

Edit: The 6.0.0-preview.1.21179.1 version of the Microsoft.NET.Tools.NETCoreCheck NuGet packages includes support for roll-forward policy. I've updated the sample arguments above to account for the new syntax.

@GF-Huang
Copy link

Where is the NetCoreCheck docs?

@MSLukeWest
Copy link
Contributor

@GF-Huang It's a simple enough tool that the help output pretty much covers it. The sole purpose of NETCoreCheck is to check if the specified runtime requirement is met on the machine. Here's the help output:

NETCoreCheck [options]
-n, --runtimename -       Runtime name                    (Example: Microsoft.AspNetCore.App)
-v, --runtimeversion -    Runtime version in format x.y.z (Example: 1.2.3)
-r, --rollforwardpolicy - (Optional) Roll forward policy  (Example: LatestMajor)
-c, --runtimeconfigfile - Path to runtime config file     (Example: c:\Foo\Bar.runtimeconfig.json)
-l, --logfile -           (Optional) Path to log file

If runtimeconfigfile is specified then runtimename, runtimeversion and rollforwardpolicy shouldn't be.

If 0 is returned the runtime requirement is satisfied.

Examples:

NETCorecheck --runtimename Microsoft.AspNetCore.App --runtimeversion 3.1.0
NETCorecheck -n Microsoft.WindowsDesktop.App -v 5.0.1 -r LatestMajor
NETCorecheck -c c:\Foo\Bar.runtimeconfig.json -l c:\Foo\Bar.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants