Download

Issue packaging (Resolved)

Hey guys,

I am unable to package and get the following error.

https://gyazo.com/552f7c1a3fd0644c340272be1e6f8a33

I have both visual studio 2017 and 2019 installed both have the correct install settings with the appropriate Unreal Engine installer options ticked on. I have also gone to the link referenced in the error and installed .NET 5.0 and it still didn’t work even after restarting the PC. I have also tried with .NET 3.0 and .NET 6.0 but still no luck. I’ve tried reinstalling UE5 as well. Below is the info from the package menu.

https://gyazo.com/0dc133af40b198c31d371ca18ba734be
https://i.gyazo.com/ae0c3517b6c4bee549d764014839ea92.mp4

The error also references a hostfxr.dll file which isnt in location below:
C:\Program Files\Epic Games\UE_5.0EA\Engine\Binaries\DotNET\AutomationTool

Any help would be amazing
Thanks guys

4 Likes

You may need to update your .NET SDK—some users have overcome the error by downloading this one: Download .NET Core 3.1 (Linux, macOS, and Windows)

8 Likes

Amazing thanks so much, just to clarify for anyone else I had downloaded using the wrong link here is a direct link to the correct version

https://download.visualstudio.microsoft.com/download/pr/e2c406c9-d40d-442c-b6cd-bc60a84d159f/556f8d45b3f5fa932785e138468a6ee3/dotnet-sdk-3.1.115-win-x64.exe

11 Likes

I wanted to say thank you for posting your problem and answer, I ran into this exact issue this morning as well. Now I’m packaging properly.

1 Like

You shouldn’t need to reinstall any dotnet core because the 5.0EA already ships with the correct dotnet core. The automation scripts just don’t seem to use it. You can work around this by setting the environment variable DOTNET_ROOT to %ENGINE_DIR%\Engine\Binaries\ThirdParty\DotNet\Windows (replace %ENGINE_DIR% with your 5.0EA install directory).

This is applicable if you see the hostfxr.dll error or if you see something like “The specified framework ‘Microsoft.WindowsDesktop.App’, version ‘3.1.0’ was not found”.

In my opinion this could be a simple fix on Epic’s side to actually use the dotnet core that the engine comes with.

2 Likes

Unfortunately, none of the proposed solutions worked for me for either building from source or packaging a game with the prebuilt UE5 binary.

It’s clear that the bundled DotNet is being used as I get Using bundled DotNet SDK from the Build.bat, so that’s not the issue.

For some reason UBT is being configured for CompilerVersion = VisualStudio2017 despite even changing Engine/Config/BaseEngine.ini to have CompilerVersion=VisualStudio2019 under [/Script/WindowsTargetPlatform.WindowsTargetSettings].

I only could get it to work by manually adding the -2019 command line parameter at the end of calling Build.bat in Visual Studio. This solution is kind of ugly when considering how the engine will call the automation tool during packaging.

I didn’t find anything in my environment variables that would indicate 2017 is being preferred.

Any other recommended paths here?

1 Like

Uhm, where’s the Package Project button?

Edit: Ah, under the Platforms button (next to the Play button)

2 Likes

I figured out my particular issue and it’s highly uncommon, but incase someone is in the same boat:

At some point, I added C:\Users\<user>\AppData\Roaming\Unreal Engine\UnrealBuildTool\BuildConfiguration.xml and hardcoded the compiler to VisualStudio2017. I did this because of some silly configuration I was figuring out with developing code plugins.

Deleting the file worked, and probably is the correct path forward when developing on both UE4 and UE5 targets.

2 Likes

It’s @Ixiguis !!!

So nice to see you again!

It’s going to be fun exploring UE5 with you and the rest of the Community!

:heart:

Rama

Worked! Thx @Defuse_Studios!

How exactly do you set the DOTNET_ROOT environment variable @David.Sullins? Can you explain?

A few methods to set an environment variable in Windows are listed here How do I set system environment variables in Windows 10? - Super User

@David.Sullins I already did this before, using the “Advanced System Settings” option. When I go to the “Environment Variables” window “DOTNET_ROOT” is nowhere to be found (it isn’t listed when using the PowerShell method either). If I create a new environment variable, name it “DOTNET_ROOT” and then set it’s value to the path you mentioned earlier nothing happens. Absolutely no difference, still can’t package my Windows projects.

Can you show me your “Enviroment Variables” window (or a list of your environment variables)? It’s very strange that “DOTNET_ROOT” doesn’t exist for me.

Hello everyone, I have been struggling with the same problem.

Here is a screenshot of the the message I get under the packaging tool dropdown for windows:
image

And here is a screen shot from the output log.

Any assistance would be much appreciated.

Hi guys, I have the same problem as you and have tried all the solutions listed here. Unfortunately without success.

Screenshot 2021-05-29 002418

Strangely, it doesn’t show any version under “SDK Managment”, but it does under “All Devices” …

And when I try anyway, the following error messages come up:

Thanks in advance!

We seem to have very similar issues, I just hope that because the title of this thread now has ‘resolved’ added to it, that it doesn’t stagnate the discussion

1 Like

Thanks this worked for me.

Hi everyone, It is good to see that a lot of people have been able to find the solution on this thread. Unfortunately I am still struggling with this issue, an assistance would be much appreciated?

1 Like

I have also tried a few things and unfortunately nothing has helped…

The strangest thing is that my old PC seems to be just fine, but I still can’t package on my preferred workstation. Maybe a full uninstall, and then re-install might help. (only hoping)