VS: Resource embedding wrong path in VS2019 C# Framework Proj
Hi, we just upgraded cmake from 3.16.xx to the latest 3.18.3 and now our embedded resources are messed up. Following things:
splash is on the root level
set(resources "Resources/Images/ico.png" "Resources/Images/abc.jpg")
add_executeable(MyApp <<lots of sources>> "splash.jpg" ${resources})
SET_SOURCE_FILES_PROPERTIES(${resources} PROPERTIES VS_TOOL_OVERRIDE "Resource")
set_property(SOURCE "splash.jpg" PROPERTY VS_TOOL_OVERRIDE "SplashScreen")
In Csproj, i find the following entrys:
<Resource Include="C:\dev\<....>\Resources\Images\ico.png"> </Resource>
and
<SplashScreen Include="C:\dev\<...>\splash.jpg"> </SplashScreen>
wich looks ok, but in Visual studio every Resources is located under Resources/ico.png, even splash wich issen even in that logical folder. Thats why the startup fails as well, as the Generated Visual Studio startup code searches for "splash.jpg", not "Resources/splash.jpg"
TL;DR; :
All Resources are logicaly located in Resources/XXX, even if they are "physicaly" located deeper or higher.
This is workaroundable for the normal resources as we can simply get them with the Resources/XXX path, but for the SplashScreen it breaks generated code!
Thanks
Cmake 3.18.3, Visual Studio 2019 16.7.4, .Net Framkework 4.6.1