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.

[Feature Request] Add ``dotnet sdk install`` to install Sdks from nuget sources.

See original GitHub issue

For example let’s say currently projects use the MSBuildExtra’s notargets sdk to mark an csproj that should not be used to build code (only packages stuff into an nuget packages like an Sdk.props and an Sdk.targets file for custom Sdks) currently there is no way to know what is the absolute latest version and consume that one. I personally think this command would be useful because:

  • the Sdk would be installed onto where the .NET Sdk is installed where the other ones bundled within are also installed.
  • Such thing could open it up where instaling the .NET Sdk itself then it could bootstrap itself and run this command to install what would normally be bundled within the installer to all platforms (like Microsoft.NET.Sdk could be installed from a nuget feed instead of bundled within the .NET Sdk installer for example if that was possible)
  • There would be an easy way to have it update (running the command would always download and install the latest one available but defaults to stable versions of them)
  • There could be an option to do prerelease sdks as well with an --prerelease switch to install the latest prerelease version and uninstall the older ones.
  • Projects that specify an specific version would not then need to specify it and instead use it the same way they can use the Microsoft.NET.Sdk currently without saying things like /1.0.0 at the end of it for example.
  • Easier to keep track of and utilize bugfix releases automatically on those custom sdks without needing to worry if you are using the latest version of those and not being able to keep track of the releases of them all the time. This command would and could simplify it all and also great for CI scenarios as well.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:7
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
marcpopMSFTcommented, Jun 10, 2021

This is definitely something that we’ve been considering. dotnet sdk check is our down payment in this direction as we can now look up the details on what are the most recent releases for each feature band. Likely in the next release we’ll look into having an update option that lets you update out of date sdks.

1reaction
AraHaancommented, Jul 27, 2021

Yes I think when and if dotnet sdk install is added that it should be bundled with dotnet sdk uninstall which will entirely reverse what dotnet sdk install does while dotnet sdk update basically “upgrades” it by first installing the newer version (and then optionally) uninstalling the older version.

But yes I think this should not only work with SDKs within nuget feeds (like nuget.org) but could also be rigged with a special command to have it “install” or “upgrade” from public “preview” to “daily” .NET SDK builds (which I would love as it would then deprecate the need for the .NET Install Scripts not to mention the need to run the .NET SDK installers to “update” each time and also upgrade the runtime itself as a bonus). I can see great usage of such system then where CI’s could be like dotnet sdk update --quality daily --upgrade-self where it would basically not only update all the nuget package based .NET SDKs that are installed from nuget sources but also the entire .NET SDK and the .NET CLI itself in a single command without the need to use the .NET Install scripts in order to upgrade all the normal .NET SDK files first.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Designate nuget source for `dotnet tool install` commands
I'd like to request a feature, like dotnet new --nuget-source for dotnet install tool. Something like the below: dotnet ...
Read more >
Install and manage packages in Visual Studio using the ...
To find and install a NuGet package with Visual Studio, follow these steps: Load a project in Solution Explorer, and then select Project...
Read more >
Install and manage NuGet packages with the dotnet CLI
The dotnet add package command adds a package reference to the project file, and then runs dotnet restore to install the package.
Read more >
NuGet Client SDK
Install the NuGet.Protocol package to interact with HTTP and folder-based NuGet package feeds: ps1. Copy. dotnet add package NuGet.Protocol.
Read more >
dotnet command - .NET CLI
Runs the application from source. dotnet sdk check, Shows up-to-date status of installed SDK and Runtime versions. dotnet sln, Options to add, ...
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