微软提供的UWP应用程序示例未在VS2017上编译
我遵循这一点在微软提供的UWP应用程序示例未在VS2017上编译,uwp,Uwp,我遵循这一点在VS2017上部署并运行他们的UWP示例,但他们总是给我下图所示的错误。例如,我尝试在windows10上的VS2017中运行CustomEditControl示例,并按照README.md中的以下说明操作,但仍然出现相同的错误: 问题:Microsoft团队或成功运行这些示例的人员能否帮助我 从他们的README.md文件中: ## Run the sample The next steps depend on whether you just want to deploy t
VS2017
上部署并运行他们的UWP示例,但他们总是给我下图所示的错误。例如,我尝试在windows10
上的VS2017
中运行CustomEditControl
示例,并按照README.md
中的以下说明操作,但仍然出现相同的错误:
问题:Microsoft团队或成功运行这些示例的人员能否帮助我
从他们的README.md文件中:
## Run the sample
The next steps depend on whether you just want to deploy the sample or you want to both deploy and run it.
### Deploying the sample
- Select Build > Deploy Solution.
### Deploying and running the sample
- To debug the sample and then run it, press F5 or select Debug > Start Debugging. To run the sample without debugging, press Ctrl+F5 or selectDebug > Start Without Debugging.
错误:
## Run the sample
The next steps depend on whether you just want to deploy the sample or you want to both deploy and run it.
### Deploying the sample
- Select Build > Deploy Solution.
### Deploying and running the sample
- To debug the sample and then run it, press F5 or select Debug > Start Debugging. To run the sample without debugging, press Ctrl+F5 or selectDebug > Start Without Debugging.
更新:
## Run the sample
The next steps depend on whether you just want to deploy the sample or you want to both deploy and run it.
### Deploying the sample
- Select Build > Deploy Solution.
### Deploying and running the sample
- To debug the sample and then run it, press F5 or select Debug > Start Debugging. To run the sample without debugging, press Ctrl+F5 or selectDebug > Start Without Debugging.
VS2017
有最新更新15.9.5
CS
文件夹中获取了样本,这意味着它是一个C#app。使用Build-->重建解决方案
菜单时,示例生成成功
。输出如下所示:
1> ----重新生成所有已启动:项目:CustomEditControl,配置:调试ARM------
1> CustomEditControl->C:\DotNET2017\UWP\Official\u samples\Windows universal samples master\samples\CustomEditControl\cs\bin\ARM\Debug\CustomEditControl.exe
=========全部重建:1成功,0失败,0跳过==========
README.md
中的说明,如果我运行Build-->部署解决方案
,它会给出错误Deploy failed
,没有任何原因。此外,VS2017
底部的错误列表
选项卡显示0个错误,如下所示:现在您已经更新了,问题是您构建了“ARM”平台。由于您的系统不是设备,因此不会在本地部署
1>------ Rebuild All started: Project: CustomEditControl,
Configuration: Debug ARM <--- THIS IS THE PROBLEM RIGHT HERE
1>----已启动全部重建:项目:CustomEditControl,
配置:调试ARM进入工具栏中的下拉框,从中可以选择输出类型(调试/发布等)
展开它,然后单击“配置管理器”,确保您的主项目选中了“构建”和“部署”复选框
这些样品通常与未经检查的样品一起提供
还要确保使用“任意Cpu”输出而不是“ARM”您没有引用第一步“构建示例”。它建造成功了吗?如果不是,那么错误是什么?VS 2017需要选择工作负载通用Windows平台开发,但是为了构建C++ UWP应用程序,你还必须选择可选组件“C++工具用于UWP应用程序”。看见在您的系统上寻找一个名为“Visual Studio安装程序”的应用程序来更新您的安装。@ChuckWalbourn在阅读了您的评论后,我添加了一个更新
部分来回答您的询问。在阅读更新后,请让我知道我可能仍然缺少什么,因为我确实认为我遗漏了一些东西。你的建议奏效了。感谢您的帮助(可能还有更多读者了解您的回复)。根据您的建议,我验证了在打开项目时已选中“构建”和“部署”复选框。此外,对于这个示例,您所说的下拉列表中没有任何Cpu
选项。唯一可用的选项是:ARM、x64和x32
。谢谢你的帮助。请在这么年轻的时候继续做好工作。“任何CPU”都是经典桌面.NET应用程序的一个选项,因为它使用的是平台无关的IL。对于UWP应用程序(包括基于.NET的应用程序),它必须是特定于平台的打包目标,因为代码是使用。