Native images generated against multiple versions of assembly System.Net.Http

大憨熊 提交于 2019-12-22 11:04:23

问题


I have Windows Phone Silverlight 8.1 application which is using BackgroundTask project for WNS and timer tasks. I`m getting following error on calling some method from BackgroundTask project:

ERROR: Native images generated against multiple versions of assembly System.Net.Http.

Does anyone have some idea where can be problem?


回答1:


I found a problem:

I have Windows Phone Silverlight 8.1 main project (converted from WP8 for IBackgroundTask support) referenced to DAL project (WP Silverlight 8.1). Also I have a background task project (WP8.1) referenced to DAL project (WP 8.1). Both DAL projects (linking classes) are using System.Http classes.

Error occurs when main WP Silverlight 8.1 project calls method of background task WP8.1 which is using some features of DAL WP8.1 project. At this moment environment loads DAL WP8.1 dll with reference to different version of System.Http library.

Solution: I moved functionality from background task project to DAL project and do not call methods of background task project in main WP Silverlight 8.1 application.



来源:https://stackoverflow.com/questions/24305952/native-images-generated-against-multiple-versions-of-assembly-system-net-http

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