Getting servicestack working on monodroid

ぐ巨炮叔叔 提交于 2019-12-11 02:22:40

问题


I'm trying to reference the servicestack dlls in a new monodroid project and I'm getting build errors.

I grabbed the dlls from here:

https://github.com/ServiceStack/ServiceStack/tree/master/release/latest/MonoDroid

And I'm getting the error

/Library/Frameworks/Mono.framework/Versions/2.10.9/lib/mono/4.0/Microsoft.Common.targets: Warning: Found a conflict between : 'mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' and 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. Using 'mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' reference.

Any advice on how to fix?


回答1:


The latest check-in in ServiceStack.Text.Android has broken the build. However it is easy to fix.

Check-out both ServiceStack and ServiceStack.Text.

Open up the ServiceStack.Text.Android project, then add a link in the Common folder to the file ServiceStack.Text\src\ServiceStack.Text\Common\DeserializeKeyValuePair.cs. Build ServiceStack.Text.Android and build the ServiceStack Android solution. Now you should have all the files needed in ServiceStack\src\ServiceStack.Common.Android\bin\Debug and ServiceStack\src\ServiceStack.Common.Android\bin\Release.

I have also put them up on my Dropbox for download here:

  • https://dl.dropbox.com/u/2991343/ServiceStack.Android/ServiceStack.Common.dll
  • https://dl.dropbox.com/u/2991343/ServiceStack.Android/ServiceStack.Interfaces.dll
  • https://dl.dropbox.com/u/2991343/ServiceStack.Android/ServiceStack.Text.dll

I do not take any responsibility for the hosted files!

EDIT: Pushed fix to my fork: https://github.com/Cheesebaron/ServiceStack.Text and created a Pull request: https://github.com/ServiceStack/ServiceStack.Text/pull/237



来源:https://stackoverflow.com/questions/13411301/getting-servicestack-working-on-monodroid

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