Put hostfxr.dll inside a versioned sub directory
Currently, we have the following layout in the setup zips:
dotnet.exe
hostfxr.dll
shared\
sdk\
Do the following instead:
dotnet.exe
shared\
sdk\
host\
fxr\
1.0.0-rc2-002200\
hostfxr.dll
1.0.1-rc2-002201\
hostfxr.dll
Currently, we are not overwriting hostfxr.dll during the installations.
Cc @piotrpMSFT @krwq @brthor @Sridhar-MS
@gkhanna79, this is needed to mitigate the interface breaks and currently we are not copying hostfxr.dll if it is in use.
@schellap Doesnt this require change in the host as well?
No, the host is already built with this logic baked in it.
I'm thinking once this model is in place for RC2, i.e., after @krwq implements it, we should use the side by side as the default first choice and then probe for the host/fxr as second choice. Right now as implemented we get sxs as the second choice in case host/fxr contains a higher version. This is to give the user a fallback.
we should use the side by side as the default first choice and then probe for the host/fxr as second choice.
We expect to have a newer version be pushed to host\fxr and not side by side. Thus, making it fallback lookup does not sound right. I think we can remove hostfxr.dll from sxs to host and always keep it under host\fxr. this will always work and will always pickup new versions correctly without break.
What do you think @schellap ?
Thus, making it fallback lookup does not sound right. I think we can remove hostfxr.dll from sxs to host and always keep it under host\fxr. this will always work and will always pickup new versions correctly without break.
Once this change is done, there would be no hostfxr.dll by the side of dotnet.exe. I am just saying if user explicitly copied one next to it we'd pick it up as an override. This gives an user to explicitly copy something next to it as a workaround.
@schellap Why is that required? What is the user scenario (other than us) doing so?
We're kicking this out to rtm. There is significant installer work that needs to happen to appropriately cover the scenario.
No issues since hostfxr.dll since last night should be backwards compatible with hostpolicy.
Tracked by https://github.com/dotnet/core-setup/issues/94