Microsoft提供的UWP应用示例未在VS2017上编译

时间:2019-01-22 16:38:12

标签: uwp

我遵循此Microsoft Guideinline上部署和运行其UWP示例,但是它们总是给我下图所示的错误。例如,我尝试在VS2017上的CustomEditControl中运行VS2017示例,并遵循Windows 10的以下指示,但仍然给我相同的错误:

问题:请微软团队的人员或成功运行以上任何示例的人员可以帮助我吗?

从其README.md文件

README.md

错误

enter image description here

更新

  1. 我正在将## 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. 与最新的Windows 10 Pro一起使用
  2. version 1809具有最新更新VS2017
  3. 我从15.9.5文件夹中获取了示例,这意味着它是一个C#应用程序。使用CS菜单时,示例将构建successfully。输出显示如下:
      
        

    1> ------重建全部开始:项目:CustomEditControl,配置:调试ARM ------     1> CustomEditControl-> C:\ DotNET2017 \ UWP \ Official_samples \ Windows-universal-samples-master \ Samples \ CustomEditControl \ cs \ bin \ ARM \ Debug \ CustomEditControl.exe     ===========全部重建:1成功,0失败,0跳过==========

      
  4. 如果我运行Build-->Rebuild Solution,则按照README.md的说明进行操作,这会给我错误Build-->Deploy Solution的提示,没有原因/原因。此外,Deploy failed底部的Error List标签显示了0错误,如下所示:

enter image description here

2 个答案:

答案 0 :(得分:1)

现在,您已经更新了,问题是您构建了“ ARM”平台。由于您的系统不是Windows on ARM设备,因此不会在本地部署。

1>------ Rebuild All started: Project: CustomEditControl,
Configuration: Debug ARM <--- THIS IS THE PROBLEM RIGHT HERE

尝试选择“ x86”或“ x64”作为平台,然后重试。

  

是的,这些项目的默认设置是“ ARM”或“ ARM64”,这很烦人,但这对您来说是字典顺序...

答案 1 :(得分:0)

转到工具栏上的下拉框,您可以在其中选择输出类型(调试/发布等...)

展开该内容,然后单击“配置管理器”,确保您的主项目同时选中了“构建”和“部署”复选框。

这些样本通常带有未选中的样本。

还要确保您使用“ Any Cpu”输出而不是“ ARM”

相关问题