Migrating to from 5.0 to 5.1: build fails "failure to generate project model definition files"

This is what I tried

  1. Create copy of my UE 5.0 project
  2. Within the copy: right-click on the .uproject file to change engine version to 5.1
  3. Try to open the project (double click on .uproject file): manual recompilation needed
  4. Try to load the project in Rider and VS: problems occur, see below
  5. Delete folders and files: .sln, .vs, saved, intermediate, binary
  6. Generate visual studio project files (right-click on .uproject file): no .sln file was created
  7. So I change the unreal engine version back to 5.0 and now I successfully created the .sln file AND then I changed the version back to 5.1
  8. Now Rider complains
Unreal Engine

Failed to generate project model definition files for "Configuration: Development Editor, Platform: Win64"

whereas my project files themselves seem fine.

Visual Studio 2022 doesn’t exactly complain, instead:

1>------ Skipped Build: Project: UE5, Configuration: BuiltWithUnrealBuildTool Win64 ------
1>Project not selected to build for this solution configuration 
2>------ Build started: Project: MurderInSpace2, Configuration: Development_Editor x64 ------
2>Using bundled DotNet SDK
2>Log file: C:\Users\rubm\AppData\Local\UnrealBuildTool\Log.txt
2>Using 'git status' to determine working set for adaptive non-unity build (F:\ue\projects\MurderInSpace2).
2>Waiting for 'git status' command to complete
2>Target is up to date
2>Total execution time: 8.48 seconds
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 1 skipped ==========

… and trying to open the project with the Unreal Editor, I still get the message that the projects needs to be compiled manually.

1 Like

Same issue here.

Did you manage to fix it at all?

No, still waiting for someone with good advice.

A coworkers was working so I compared and discovered I didn’t have the .Net SDK component installed in my VS 2022. I installed that and suddenly the generate project files started working again. Maybe try that?

I have .NET SDK installed (I checked in the Visual Studio Installer → Components).

If that would be missing, I think I couldn’t generate project files at all, not for 5.1, not for 5.0.

Maybe 5.1 can’t find my .NET SDK installation or it has specific version requirements. Can’t find anything about that, though.

You might need .NET 6.0 runtime, I got prompted to install that at some point

This might be a stupid question but did you right click your game in the project solution in vs and choose “Set as startup project”? (your game project should be in bold)

the line

1>Project not selected to build for this solution configuration 

could suggest you might not have it picked

1 Like

I think that was it. I check the “.NET 6.0 runtime” and now a .sln file gets generated. Still working out other errors, … but I am confident it will work.

Thanks for the hint. But yes, my game project is in bold

So it turns out, there is a problem with renaming C++ projects. When cloning a project Unreal warns you that it might not compile - w/o any advice what to do about it.

Now I cloned my project by selecting a different folder, yet keeping the same name … and switching engine versions worked, w/o even starting VSC or Rider.