我正在用Xamarin表单创建一个应用程序,我会用OxyPlot显示图形,在安卓和Windows Phone上运行Hello World OxyPlot,但我在IOS上有一个问题。当模拟器加载时,应用程序将发送以下内容:
{System.IO.FileNotFoundException:无法加载文件或程序集‘OxyPlot.Xamarin.iOS’}
和堆栈:
/Users/builder/data/lanes/1962/8b265d64/source/mono/mcs/class/corlib/System/AppDomain.cs:706中的System.AppDomain.Load (assemblyRef={OxyPlot.Xamarin.iOS,Version=2015.1.889.0,Culture=neutral,PublicKeyToken=null},assemblySecurity=(null))
这似乎不是指打包Oxyplot.xamarin.iOS,而是不是如何解决它。
我已经在每个平台中添加了OxyPlot Xamarin表单的Nuget预发布。正如我在android和windows phone中提到的(使用visual studio)工作正常。
感谢您的关注,如果需要更多数据,请继续关注。
问候
发布于 2015-07-21 22:24:17
确保您已经安装了https://www.nuget.org/packages/OxyPlot.Xamarin.Forms/。然后,您需要通过在Xamarin.Forms.Forms.Init()
之前添加以下调用来初始化OxyPlot渲染器
iOS:OxyPlot.Xamarin.Forms.Platform.iOS.Forms.Init();
安卓:OxyPlot.Xamarin.Forms.Platform.Android.Forms.Init();
WinPhone:OxyPlot.Xamarin.Forms.Platform.WinPhone.Forms.Init();
或
程序集可能因为Xamarin链接器而被截断。添加:
iOS项目中的var ignoreOxyplot = typeof(OxyPlot.Xamarin.Forms.Platform.iOS.PlotViewRenderer)
FinishedLaunching
方法。
请参阅:http://forums.xamarin.com/discussion/comment/122219
https://stackoverflow.com/questions/31532164
复制相似问题