VS2015编写Win10通用应用提示error CS0012的问题解决方案

1>------ 已启动生成: 项目: App6, 配置: Debug x86 ------
1>C:\Users\Administrator\documents\visual studio 2015\Projects\App6\App6\MainPage.xaml.cs(33,26,33,67): error CS0012: The type 'IAsyncAction' is defined in an assembly that is not referenced. You must add a reference to assembly 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime'.
1>C:\Users\Administrator\documents\visual studio 2015\Projects\App6\App6\MainPage.xaml.cs(33,26,33,67): error CS0012: The type 'IAsyncActionWithProgress<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime'.
1>C:\Users\Administrator\documents\visual studio 2015\Projects\App6\App6\MainPage.xaml.cs(33,26,33,67): error CS0012: The type 'IAsyncOperation<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime'.
1>C:\Users\Administrator\documents\visual studio 2015\Projects\App6\App6\MainPage.xaml.cs(33,26,33,67): error CS0012: The type 'IAsyncOperationWithProgress<,>' is defined in an assembly that is not referenced. You must add a reference to assembly 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime'.



测试了一下Win10的通用应用,结果莫名其妙就遇到了这个问题,资料翻了一下午,尝试了各种方法,没有发现什么可用的解决方案。


然后我在另一个没有装过VS2015的机器上直接安装VS2015+Win10SDK,同样的代码没有任何问题。



总结,你肯定之前安装过RC版本的VS2015,或者有卸载重装过VS2015。 


希望刚开始折腾windows通用应用的同学,遇到这个问题不要浪费时间了!

请跟我一起重装系统吧!因为修复重装VS2015什么的都没用的!



  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值