错误MSB3843:项目目标平台“Windows”,但引用SDK“***”其目标是平台“UAP”。 [英] error MSB3843: Project targets platform "Windows", but references SDK "***" which targets platform "UAP".

查看:303
本文介绍了错误MSB3843:项目目标平台“Windows”,但引用SDK“***”其目标是平台“UAP”。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用CMake 3.9.3创建了一个VS2017解决方案。该解决方案包含一个UWP应用程序项目和几个静态库项目。对于任何静态库项目,如果我设置 "Windows应用商店应用支持"是的,我得到构建错误:

I created a VS2017 solution using CMake 3.9.3. The solution consists of one UWP app project and several static library projects. For any static library project, if I set "Windows Store App Support" to Yes, I get build errors:

错误MSB3843:项目"mgraph"目标平台"Windows",但引用SDK"Visual C ++ 2015 Runtime for Universal Windows Platform Apps v14.0"它针对平台"UAP"。

error MSB3843: Project "mgraph" targets platform "Windows", but references SDK "Visual C++ 2015 Runtime for Universal Windows Platform Apps v14.0" which targets platform "UAP".

可以通过设置"Windows应用商店应用支持"来修复此错误。如果我没记错的话,禁用商店支持将使我们的应用无法通过WACK测试。 

This error may be fixed by setting "Windows Store App Support" to No. But disabling the store support will make our app fail to pass WACK test, if I remember correctly. 

推荐答案

嗨  ;伦纳德,

Hi Leonard,

欢迎来到
开发通用Windows应用论坛
!请使用  标记 
发布到此论坛时,谢谢!

您可以尝试使用Visual C ++创建一个新的静态库vcxproj - > Windows - >通用 - > "静态库(通用Windows)"。模板。

You can try to create a new static library vcxproj using the Visual C++ -> Windows -> Universal -> "Static Library (Universal Windows)" template.

这是一个类似的线程,你可以有一个参考:

Here is a similar thread, you can have a reference:

HTTPS://social.msdn。 microsoft.com/Forums/SqlServer/en-US/3927e229-a61d-4b2a-a5c5-ea2b1a7f233c/cannot-build-c-library-with-windows-store-support?forum=wpdevelop

祝你好运,

Breeze


这篇关于错误MSB3843:项目目标平台“Windows”,但引用SDK“***”其目标是平台“UAP”。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆