Add additionalProbingPath to runtimeconfig.json
For the development time scenarios of doing "dotnet build" followed by "dotnet
CLI infrastructure should add a "additionalProbingPath" property to runtimeconfig.json that the host can read to support this scenario.
Assigning to @brthor per discussion.
CC @Petermarcu @piotrpMSFT @blackdwarf @schellap
@gkhanna79 @schellap
So this will be a top level property in the runtimeconfig.json?
Quick mockup of how I envision it:
{
"runtimeOptions": {
"additionalProbingPaths": ["~/.nuget/packages"],
...
},
"frameworks": ....
}
This will also be set regardless of app type? For both portable and standalone.
I would suggest this would be part of the runtimeOptions section.
Yeah that makes more sense. Updated above
@schellap @gkhanna79 can we reach a consensus on how we want to do this? Should we create a separate .devruntimeconfig.json or go with a separate session for this information or just follow @brthor's suggestion above?
I think it is fine to keep this in runtimeOptions section. Additionally, @brthor please plumb "dotnet build" to insert this property and "rollforward:false" and plumb "dotnet publish" to remove both of them.
@gkhanna79 I will do this work. So, I will add "additionalProbingPaths": ["..."] and "rollforward": "false" to runtimeconfig.json only when doing dotnet build. They will not be present when doing dotnet publish.
Also, do we need this for both standalone and portable or just standalone?
@livarcocc yes, this is done when running a development time artifact (which is the output of dotnet build) and not set when running the published output.
I presume doing this for development time also addresses it for the xunit discussion we had today?
"additionalProbingPaths": ["~/.nuget/packages"],
Just a clarification, additionalprobingpath is a single entity not an array. It should be a string. This has a special (internal) meaning and comes low in the precedence unlike other shared paths.
@livarcocc can you please name the property as "applyPatch" instead of "rollForward"? @schellap Please make appropriate changes for the property name in the host as well.
@blackdwarf @leecow Thoughts on the property name?
This has a special (internal) meaning and comes low in the precedence unlike other shared paths.
@schellap Per our discussion yesterday, if the additionalProbePaths are processed after dotnetextensions and FX, there will be nothing special about them. And order of probing is an implementation detail. Also, this will work for the standalone xunit like scenario (post dotnet build) since there will be no FX path at that point and flow will fall into probe paths.
Any reason why the property shouldnt carry multiple paths?
@gkhanna79 I would leave rollForward since it is clearer what is happening.
@blackdwarf, @gkhanna79 - what specifically is rollForward / applyPatch controlling? I have some ideas but would rather see it written down than making stuff up ;-)
@gkhanna79, then I don't get in what sense it is additional. Additional, as per user means after app local. Shared paths means we can set the precedence and educate the user.
So, this is how we are going to do this:
- Additional probing path: Will be put inside a runtimeconfig.dev.json and it will be an array. This file will only be generated by build and won't be copied over for publish.
- Rollfoward: the host will implement a policy where it will look for the runtimeconfig.dev.json file. If it is present, roll forward will always be false and it will ignore whatever is inside runtimeoptions of the runtimeconfig.json file.
- We will copy over the properties from project.json runtimeoptions to runtimeoptions of runtimeconfig.json, including additionalprobingpath and rollforward.