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

Bengt Ehn ehn.bengt at gmail.com
Fri Jul 26 07:28:37 EDT 2019


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
<https://drive.google.com/open?id=1ekGxtEXC2mqMpJJb_kKMT-5HmM6QjuFx> in
case they vanish.
Probably there is just a simple error but I cannot find it.

Thank you in advance,
Bengt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20190726/0e92c957/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: App1_uwp.zip
Type: application/x-zip-compressed
Size: 21859 bytes
Desc: not available
URL: <https://cmake.org/pipermail/cmake/attachments/20190726/0e92c957/attachment-0001.bin>


More information about the CMake mailing list