How to resolve “ 'IAsyncActionWithProgress<>' is defined in an assembly that is not referenced” in Windows UAP app

二次信任 提交于 2019-12-04 06:18:40

I had the same problem with the IAsyncAction and I have just managed to solve it, so I am going to share the (maybe not the best) solution.

First I tried repair VS, no success. Then reinstalling VS, again no success. So I went to control panel -> programs -> uninstall programs, and from there I uninstalled everything that had something to do with Visual Studio or .NET. It displayed me a couple of errors, like that some applications require this program to run, but i anyway uninstalled it (if I will need it I will install it again). After that I installed Visual Studio again, wrote the code which caused the error and, it worked, with no error.

Hope this helps you as it did help me.

Sounds to me like your migration from Windows 8.1 to Windows 10 didn't go through quite right. Andy Wigley has a video with instructions on how to migrate a Windows 8.1 project to Windows 10. His example is for Phone but also applies to desktop. Here's the video: http://www.microsoftvirtualacademy.com/training-courses/a-developers-guide-to-windows-10-preview. Go look at the section titled "Migrating 8.1 Apps to Windows 10".

To be clear, you shouldn't need to add any references to get those types working in a Windows 10 Universal App. A good starting point (on Andy also points out in his video) is to create a new black Windows 10 Universal App project and compare your project and package manifest files to it and just bring over the changes.

I think the issue is the following, you can deploy on the Windows Phone but when you try to access to specific functions of the Phone you need to add

Looks like changing Project -> Properties -> Library -> Min version from any version below 14393 to 14393 or above helps with the issue.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!