Feature Request: command that runs ConfigureDotNetForFirstTimeUse
See original GitHub issueSteps to reproduce
When building our own custom images that have .NET Core on them, we would like to prime the nuget cache while the OS image is being built. Currently, we do this by having a dummy project.json in a temp directory, then calling dotnet restore
on it. That way when OS images are spun up, they don’t lose ~10-20 seconds.
This feels a little “duct-tapish” to me. It would be very handy if there were a specific CLI command that did only this “priming” of the nuget cache.
Expected behavior
A command, such as --prepare
, that runs ConfigureDotNetForFirstTimeUse
. It should be a no-op if the cache is already there. It should also return an exit code of zero so that build scripts / Docker files don’t think the image creation failed.
Actual behavior
There is no command.
Environment data
dotnet --info
output:
.NET Command Line Tools (1.0.0-preview2-003148)
Product Information: Version: 1.0.0-preview2-003148 Commit SHA-1 hash: 18ca244551
Runtime Environment: OS Name: Mac OS X OS Version: 10.12 OS Platform: Darwin RID: osx.10.11-x64
Issue Analytics
- State:
- Created 7 years ago
- Comments:19 (13 by maintainers)
Top GitHub Comments
Hey guys, what about just
dotnet init
?@piotrpMSFT I’ve already talked with @MichaelSimons about this a while back. My suggestion was that given that this was a configuration task that we expose this through a more general-purpose
configure
verb in the CLI.I would like to avoid adding a lot of top-level switches for various things and would rather we have top level verbs that can/should contain multiple similar functionalities.