sdk icon indicating copy to clipboard operation
sdk copied to clipboard

Put hostfxr.dll inside a versioned sub directory

Open schellap opened this issue 10 years ago • 8 comments

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 avatar Apr 07 '16 23:04 schellap

@schellap Doesnt this require change in the host as well?

gkhanna79 avatar Apr 08 '16 00:04 gkhanna79

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.

schellap avatar Apr 08 '16 00:04 schellap

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 ?

gkhanna79 avatar Apr 08 '16 15:04 gkhanna79

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 avatar Apr 08 '16 18:04 schellap

@schellap Why is that required? What is the user scenario (other than us) doing so?

gkhanna79 avatar Apr 08 '16 18:04 gkhanna79

We're kicking this out to rtm. There is significant installer work that needs to happen to appropriately cover the scenario.

TheRealPiotrP avatar Apr 12 '16 17:04 TheRealPiotrP

No issues since hostfxr.dll since last night should be backwards compatible with hostpolicy.

schellap avatar Apr 12 '16 17:04 schellap

Tracked by https://github.com/dotnet/core-setup/issues/94

TheRealPiotrP avatar Jun 07 '16 18:06 TheRealPiotrP