-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Hostfxr.dll load failure with arm64 app on arm64 Windows 11 host #65263
Comments
Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov Issue DetailsDescriptionAfter deploying a hello-world framework-dependent portable net6.0 app onto a Windows 11 arm64 host, attempts to launch that app result in failure. Reproduction Steps
Expected behaviorApp to run and print Actual behaviorApp fails with:
Regression?No response Known WorkaroundsNo response ConfigurationWindows 11 22504.1010 (arm64) Other information
|
I didn't try on actual Windows ARM64, but following the repro steps I think the problem is with the publish. The command line So if I follow the repro steps, the produced I think the main problem here is that apphost is not clever enough to default to the x64 install location on arm64 hardware. It did look into registry, into the x64 key, but that doesn't exist - failed with 0x2 ERROR_FILE_NOT_FOUND. So if defaults to the hardcoded install location - which should be We sort of fixed this with this PR: #59890 Maybe we should consider backporting this fix to 6.0. Other improvements:
|
Hm @vitek-karas, I can verify the apphost is x64. But no configuration of publish commands appears to correct this. (For example, I tried |
I think that |
Any updates on this issue? I get the same error message when creating an inital migration for a database via the EntityFramework CLI tools, for example when trying to execute:
strictly following the process described by Microsoft: https://docs.microsoft.com/en-us/ef/core/managing-schemas/migrations/?tabs=dotnet-core-cli The exact error is
The error might be related to the EF Core .NET CLI tools (https://docs.microsoft.com/en-us/ef/core/cli/dotnet) when running on ARM64. Maybe anyone from Microsoft has to look into this? |
@vitek-karas Friendly ping. Would be great if we could get this into 6.0 servicing, given it's a LTS release. |
We're looking into it, but note that it might not fix the |
I would greatly appreciate if someone can present me a workaround for using the basic database migrations commands with |
Update: Problem is resolved, see dotnet/efcore#27787 (comment) . |
We have backported a fix into 6.0 servicing which should make the x64 apphost look for the runtime in the correct location for the x64 runtime (and fail reasonably if one doesn't exist). It will be in 6.0.6. |
@elinor-fung That's fantastic, thanks for closing the loop! |
Can you please check the version of the apphost? |
Do you have x64 runtime installed? |
Well - it's weird that there are directories there but no dotnet.exe. It's as if the install is either corrupted or something else went wrong. In any case, I don't think your apphost has the fix mentioned above - the commit hash it has is from Apr 13, while the fix was ported to 6.0 in May. @elinor-fung do you know which version of 6 has the fix and if it's in one of the public releases? |
6.0.5 does not have the fix. The fix is in 6.0.6 - just released recently (14-JUN), so you'd need to rebuild the app with that to pick up the fixed apphost. |
Hello, seems like 6.0.6 didn't fix the issue. I'm still experiencing this error, running on Windows Server 2022 version 21H2 x64. |
@roofiq This GitHub issue is specific to the behavior on ARM64. Since you're running into a similar error message but on X64 I suggest you create a new issue as it's very likely not related. |
Closing as resolved |
Description
After deploying a hello-world framework-dependent portable net6.0 app onto a Windows 11 arm64 host, attempts to launch that app result in failure.
Reproduction Steps
dotnet_6_arm64_repro.zip
(see below)dotnet publish
\bin\ARM64\Debug\net6.0\publish\
to arm64 machinedotnet_6_arm64_repro.exe
.NET 6.0 Desktop Runtime (v6.0.2) - Windows arm64
, and revisit step 4.Expected behavior
App to run and print
Hello, World!
successfully.Actual behavior
App fails with:
Regression?
No response
Known Workarounds
No response
Configuration
Windows 11 22504.1010 (arm64)
Visual Studio 2022 17.0.5
Other information
dotnet_6_arm64_repro.zip
Core host trace, verbosity=4
The text was updated successfully, but these errors were encountered: