-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Usage of new TFMs in runtimeconfig and host #34033
Comments
Who is the SDK contact for the TFM work? - the SDK has probably much more "shared store" code in it, which might be affected as well. |
I think we should let this "tfm" be the part of the TargetFramework without the operating system info. So just |
Is this something that needs to be done for .NET 5? |
We are tracking the SDK change for this with dotnet/sdk#11010. I'm not sure if there's any runtime change that will be needed. @vitek-karas |
@dsplaisted could you please link the right issue in SDK (the one you linked is from 3 years ago, so probably not the right one)? I guess it's back to the original question above: What TFM will SDK write to /cc @agocke |
@vitek-karas Sorry, I've now corrected the link. Our plan is to write the TargetFramework without platform information to the runtimeconfig.json, ie Thanks |
Perfect - in that case I don't think there's anything to be done on the hosting side (it all should work just like |
@vitek-karas can we close this issue now then? trying to burn down 5.0 milestone |
The SDK in dotnet/sdk#11010 makes sure that it only every writes the simple TFM into the runtime config. Since that is really the only place where TFM is read from in the host, it should all work the same as before and thus no new host work seems to be necessary. |
The new set of TFMs as per the design is relatively large as the TFM now contains not just the version of .NET but also the target OS and possibly even OS version.
Currently the SDK writes the TFM into
.runtimeconfig.json
into atfm
property. Typical.runtimeconfig.json
:The value comes directly from the
<TargetFramework>
property in the project file.The value in
.runtimeconfig.json
is used only in two relatively fringe scenarios in the host:$DOTNET_SHARED_STORE/|arch|/|tfm|
where the|tfm|
is replaced by the value from thetfm
property.|arch|/|tfm|
where it's again replaced with the value of thetfm
property.The most common usage of these is the
.runtimeconfig.dev.json
(auto-generated by SDK duringdotnet build
) which contains path to the user-local shared store:and then any usage of the shared store, where the folder structure on disk must match the TFM used in the configuration file.
If we keep the behavior as is, it would mean that these shared store paths would now include the full TFMs - like
net5.0-windows10.0
or similar.Without any changes the shared store may need to have multiple copies of the same file for all of the hierarchical TFMs:
net5
,net5.0
,net5.0-windows
andnet5.0-windows10
if it would server multiple apps each using slightly different but still fully compatible TFM.The question is if the SDK should write the "Simple" TFM into the
.runtimeconfig.json
- in this case probablynet5.0
or if the host will have to start understanding the hierarchical nature of TFMs and be able to parse them.The text was updated successfully, but these errors were encountered: