VS: DOTNET_SDK project does not include xaml files
I am trying to generate a .Net SDK-style (DOTNET_SDK) WPF project, but I am not able to include xaml files (e.g. App.xaml) in the generated project. This works fine when generating in the old .Net project format.
Minimal Cmake to reproduce:
cmake_minimum_required(VERSION 3.23)
project(SDKStyleTest LANGUAGES CSharp)
set(CMAKE_DOTNET_SDK "Microsoft.NET.Sdk")
set(CMAKE_DOTNET_TARGET_FRAMEWORK "net5.0-windows")
add_executable(test App.xaml.cs App.xaml)
set_property(TARGET test PROPERTY VS_GLOBAL_UseWPF "true")
Expected result:
A project file which includes the App.xaml as a <Page>
element in the <ItemGroup>
Actual result: A project file which only includes the App.xaml.cs file
Edited by Brad King