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: command that runs ConfigureDotNetForFirstTimeUse

See original GitHub issue

Steps 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:closed
  • Created 7 years ago
  • Comments:19 (13 by maintainers)

github_iconTop GitHub Comments

3reactions
old-scalefocuscommented, Mar 1, 2017

Hey guys, what about just dotnet init?

2reactions
blackdwarfcommented, Dec 5, 2016

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Backlog Milestone
dotnet publish shows garbled characters when running on PMC on OS with Traditional ... Feature Request: command that runs ConfigureDotNetForFirstTimeUse.
Read more >
Getting UnauthorizedAccessException when deploying ...
I have set up Continuous Deployment of my aspnet core 2.2 app using Kudu build service (directly connected through GitHub). It was fine...
Read more >
Build nuget restore fails | Azure Devops
This command takes up to one minute to complete and only runs once. ... ConfigureDotNetForFirstTimeUse(INuGetCacheSentinel nugetCacheSentinel ...
Read more >
Search existing Azure DevOps feedback
We have an exisiting on-prem TFS server containing all of our existing code. I was able to upgrade that to 2018 u2, and...
Read more >
.NET Core on Raspberry Pi - Access to the path is denied
NET Core sdk on my Raspberry Pi I received the following error when attempting to create a new console application using the 'dotnet...
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