Help including WPF project.

Hello, in my CMakeLists.txt file I have the following code to include a WPF project into the Visual Studio solution generated by CMake.

include_external_msproject(OrchisEditor OrchisEditor/OrchisEditor.csproj PLATFORM AnyCPU)

The WPF run successfully but the Designer does not load and shows the message “Some assembly references are missing. Building to restore the NuGet cache might resolve this issue.”.
Building the project does not solve the issue.
Inspecting the .sln file generated by CMake the definition of the WPF project is given as:

Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrchisEditor", "OrchisEditor\OrchisEditor.csproj", "{20A03BFA-93D8-3837-8F42-FCFB6B897B48}"
	ProjectSection(ProjectDependencies) = postProject
		{8A437C08-6EEE-35D7-83DD-51399A66C032} = {8A437C08-6EEE-35D7-83DD-51399A66C032}
	EndProjectSection
EndProject

I’ve manually created a new WPF project in the solution and copied the source files to it and the Designer works normally there. its definition in the .sln file is:

Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrchisEditor", "OrchisEditor\OrchisEditor.csproj", "{69F9C257-B7AE-449E-B161-6BC641E27FC1}"
EndProject

If I replace the definition CMake generated for the WPF by this last one the Designer starts to work.
Have I done something wrong when including the project or how do I fix this?