问题描述
我有一个正在运行的WP8应用程序,我正在尝试迁移到WP8.1,但很惊讶看到以下错误的组件丢失:
I have a working WP8 app that I'm trying to migrate to WP8.1, but was surprised to see errors that the following assemblies were missing:
- System.Device(使用System.Device.Location.GeoCoordinate类)
- Microsoft.Phone(利用Microsoft.Phone.UserData.Contact及相关类)
包含的确切错误(加上类似的其他错误):
The exact errors included (plus similar others):
- 类型或命名空间名称'Phone'不存在于命名空间"Microsoft"(您是否缺少程序集引用?)
- 找不到类型或命名空间名称"Contacts"(您是否缺少using指令或程序集引用?)
当我尝试将新的引用添加到项目时,Assemblies>下的列表框架说已经包含了所有内容,并且在Assemblies>下的列表中扩展名为空。
When I try to add new references for these to the project, the list under Assemblies > Framework says everything is included already, and the list under Assemblies > Extensions is empty.
我发现汇编DLL位于以下位置:
C:\Program Files(x86)\ Reference Assemblies\Microsoft \\ \\ Framework\WindowsPhone\v8.1
I discovered the assembly DLL's in the following location:
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\WindowsPhone\v8.1
我手动添加了对这些文件的引用。 这解决了所有以前的错误,但现在我得到一个构建错误"无法在模块mscorlib.dll中找到类型System.SystemException",这告诉我可能有一个程序集冲突
某处,但是我没有'触摸了mscorlib程序集。
I manually added references to those files. This resolved all of the previous errors, but now I get a build error "Cannot find type System.SystemException in module mscorlib.dll", which tells me there is probably an assembly conflict somewhere, however I haven't touched the mscorlib assembly.
我觉得我不应该手动添加这些引用,但我没有看到任何其他选项。 有什么想法吗? 谢谢。
I feel like I shouldn't be adding these references manually, but I didn't see any other option. Any ideas? Thanks.
推荐答案
Microsoft.Phone.UserData .Contact在Windows Phone 8.1中可用
Microsoft.Phone.UserData.Contact is available in Windows Phone 8.1
这篇关于将应用程序从WP8迁移到WP8.1时缺少程序集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!