Unable to Package Games in Unreal Engine 5.1.0, help greatly appreciated

I recently encountered a problem while trying to package my first Unreal Engine 5.1 project for Windows using blueprints. No matter what I try, I receive the error message “SDK for Windows is not installed properly.”, I press continue anyway, and am in fact unable to package the game. I have tried reinstalling both Unreal Engine and the Epic Games Launcher, but the issue persists. I also attempted to package the default Third Person Starter Template project, and the problem remains. I’ve installed visual studio 2022, the latest .NET, and windows SDK. I have copied the hostdxr.dll file to the Automation tool folder. My graphics driver and windows are both updated. None of these attempts at resolving the issue have been successful.

The following are the warnings and error in my output log:

“LogWindows: Warning: CreateProc failed: The system cannot find the file specified. (0x00000002)
LogWindows: Warning: URL: C:/Program Files/Epic Games/UE_5.1/Engine/Build/BatchFiles/RunUAT.bat -ScriptsForProject=“D:/MY GAMES/PackageTest/PackageTest.uproject” BuildCookRun -project=“D:/MY GAMES/PackageTest/PackageTest.uproject” -noP4 -clientconfig=Development -serverconfig=Development -nocompile -nocompileeditor -installed -unrealexe=“C:\Program Files\Epic Games\UE_5.1\Engine\Binaries\Win64\UnrealEditor-Cmd.exe” -utf8output -platform=Win64 -cook -map=/Game/ThirdPerson/Maps/ThirdPersonMap+/Game/ThirdPerson/Maps/ThirdPersonMap -CookCultures=en -unversionedcookedcontent -stage -deploy -cmdlin
e=”/Game/ThirdPerson/Maps/ThirdPersonMap -Messaging" -device=“Windows@DESKTOP-VSRTGBF” -addcmdline=“-SessionId=473D00544F45F3814B60DA8723FEC37D -SessionOwner=‘jackla’ -SessionName=‘Launch On Device’ " -run
PackagingResults: Error: Launch failed! Unknown Error”

I would greatly appreciate any advice or guidance on how to resolve this issue. I am pretty new to unreal game development but if there’s any questions or if any additional info is needed I’ll do my best to provide an answer. Thank you.

The error message “SDK for Windows is not installed properly” suggests that Unreal Engine is unable to find the necessary components to package your project for Windows.

Based on your description, it seems like you have done all the necessary installations, but the issue still persists. Here are a few things you can try:

  1. Ensure that all necessary components are installed correctly and updated to the latest version.
  2. Check the installation paths of Unreal Engine and the Windows SDK, and make sure they match with the paths mentioned in the error message.
  3. Try running Unreal Engine as administrator to ensure that it has the necessary permissions to access the files.
  4. Check if the hostdxr.dll file is present in the correct folder, and if it is not, try copying it again. (Probably not the cause though)
  5. Make sure that Visual Studio and .NET are compatible with Unreal Engine 5.1.
  6. If none of the above steps work, you can try resetting Unreal Engine to its default settings. You can do this by deleting the Engine/Saved folder, or by using the “Reset to Default” option in the Epic Games Launcher.

These are some steps that may help you resolve the issue. If you continue to face the problem, it might be helpful to post more detailed logs or specific error messages that you receive.