Building cmake generated UWP windows desktop project results in error MC6000 (missing WindowsBase, ...)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Building cmake generated UWP windows desktop project results in error MC6000 (missing WindowsBase, ...)

Bengt Ehn
Hello,

I created a simple windows UWP solution with windows visual studio 2019.
I did not make any changes to it but closed visual studio. 

Then I wrote a simple cmake file for it.
However, it fails in "cmake --build" like this:

C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets(268,9): error MC6000: Project file must include the 
.NET Framework assembly 'WindowsBase, PresentationCore, PresentationFramework' in the reference list. [App1\out\App1.csproj]

When I add the requested .NET files, three is a different error: 

App1\MainPage.xaml(9,5): error MC3074: The tag 'ThemeResource' does not exist in XML namespace 
'http://schemas.microsoft.com/winfx/2006/xaml/presentation'. Line 9 Position 5. [App1\out\App1.csproj]

I cannot overcome these problems.
I generate and compile the solution like this:

cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 -S . -B out
cmake --build out

Cmake version is 3.14.19050301-MSVC_2.
The source files are attached but also on google drive in case they vanish.
Probably there is just a simple error but I cannot find it.

Thank you in advance,
Bengt

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

App1_uwp.zip (29K) Download Attachment