How do I add a system.core.dll reference to my project in xamarin studio/monodevelop

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-30 11:07:32

问题


I'm trying to use System.Linq because it has an 'Unknown resolve error'. I've done a bit of looking around on how to do this and all I can find is people saying that it needs to be added or that they added it. I'm wondering how to add it to my project so that I can use the '.ToList' function.


回答1:


If you are doing a traditional iOS or Android project with Xamarin Studio, by default a reference to System.Core should already be added.

However, if you're creating a PCL you will see a reference to it, but it will be red in the References folder. This is because PCLs are not fully supported yet. There is a work around though.

You can copy the Core DLL from your Mono install and reference it in your PCL project. I was able to find this PCL on my Mac here: /Library/Frameworks/Mono.framework/Versions/3.0.10/lib/mono/4.0 - mscorlib.dll

I usually have a folder called "DLLs" inside my project folder that I put these type of DLLs and reference.

Hopefully in the near future we won't have to mess with hacks like this with PCLs.



来源:https://stackoverflow.com/questions/16747774/how-do-i-add-a-system-core-dll-reference-to-my-project-in-xamarin-studio-monodev

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