In 2.2 tools packages, multitarget 2.2 and 2.1 so latest version is usable with LTS SDK #4613
Labels
area-commandlinetools
Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI
feature-devcerts
Problem
Summary from dotnet/source-build#926:
The source-build SDK product used by Red Hat doesn't include ASP.NET Core cli tools (e.g.
dotnet-dev-certs
). When the user tries to use the tool, they're prompted to rundotnet tool install --global dotnet-dev-certs
. That works when the SDK they're using is the latest stable SDK available, like 2.2.101. However, it doesn't work in the2.1.500
SDK with2.1.6
Runtime anymore:The existence of the
2.2.0
tool package on the NuGet gallery prevents the desired, compatibledotnet-dev-certs 2.1.1
package from being found.The workaround is to add
--version '2.1.*'
or a specific version to thedotnet tool install
command.Solution
If the
2.2.0
package also supportednetcoreapp2.1
, then the user would install2.2.0
successfully and be on their way. The way to do this is through multitargeting:Reasons this might not work well:
2.1.*
and2.2.*
tool packages, I can imagine that being difficult to maintain. I think 2.1 changes would need to be maintained in both the 2.1 ASP.NET branch as well as the 2.2 branch so 2.2 can targetnetcoreapp2.1
.Alternatives
There are other solutions described in dotnet/source-build#926 that are more palatable and wouldn't need any changes on your part. Multi-targeting is just one approach I think is worth asking about in case I've misjudged it. 😄
/cc @natemcmaster @omajid @wli3
The text was updated successfully, but these errors were encountered: