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.

Stop adding a runtimeconfig.dev.json by default on built apps

See original GitHub issue

Probing consumes a significant ammount of time at startup in the host. With changes introduced in https://github.com/dotnet/runtime/pull/50671, we move away from expensive file-accessing calls made by the host’s probing logic and make them conditional upon whether any additional probing paths were passed to hostpolicy. This improves performance of any dotnet ... command as well as the time to main.

Note that by default the SDK generates a <app>runtimeconfig.dev.json when building an app, which ends up adding additional probing paths which are not necessary (all dependencies are included in the app folder which is probed first, related: #15210) – causing the host to probe more than necessary and missing on any performance gains achieved by the above PR.

/cc @vitek-karas @brianrob

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
benvillaloboscommented, Apr 14, 2021

Sounds like we want to stop this from happening by default while having some flag if you need this to be generated.

2reactions
dsplaistedcommented, Apr 9, 2021

Yes, I think we should turn of the runtimeconfig.dev.json by default. I think we still need it prior to 3.x where we wouldn’t copy referenced NuGet DLLs to the output folder. Also we may still need it if we are using the runtime package store for this line: "C:\\Users\\daplaist\\.dotnet\\store\\|arch|\\|tfm|",

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get rid of '%AppName%.runtimeconfig.dev.json ...
If I build a default app in release, via the dotnet build -c Release command, here's the content of the folder: Build folder...
Read more >
runtimeconfig.dev.json file not generated - .NET
Learn about the breaking change in the .NET 6 SDK where the runtimeconfig.dev.json file is no longer generated by default.
Read more >
NET Runtime configuration settings
NET apps. Configuring an option in the runtimeconfig.json or project file applies the setting to that application only.
Read more >
Deep-dive into .NET Core primitives, part 3: runtimeconfig. ...
NET Core applications contain a file named <something>.runtimeconfig.json . This file can be used to control a variety of options.
Read more >
Fix unable to find *.deps.json for unit tests in .NET 5
Learn about two possible solutions for the "Unable to find *.deps.json" error when trying to run unit tests for .NET 5 in Azure...
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