简体   繁体   English

Xamarin Forms:ImageCircle包在发行模式UWP中不起作用

[英]Xamarin Forms:ImageCircle package is not working in release mode UWP

For the circle image, I am using Xam.Plugins.Forms.ImageCircle package and it is working fine in debug mode. 对于圆形图像,我使用的是Xam.Plugins.Forms.ImageCircle包,它在调试模式下工作正常。

But in release mode, all the pictures are in square format. 但是在释放模式下,所有图片均为正方形格式。 I uninstall and reinstall the nuget. 我卸载并重新安装nuget。 Also, do clean, rebuild and deleting bin and obj folders, but still the issue is not resolved. 另外,请执行清理,重建和删除bin和obj文件夹的操作,但是仍然无法解决问题。

Thanks in advance 提前致谢

You might be running into this piece of the documentation . 您可能正在阅读本文档

For linking you may need to add: 要进行链接,您可能需要添加:

Android: 安卓:

ImageCircle.Forms.Plugin.Abstractions;ImageCircle.Forms.Plugin.Android; ImageCircle.Forms.Plugin.Abstractions; ImageCircle.Forms.Plugin.Android;

iOS: iOS版:

--linkskip=ImageCircle.Forms.Plugin.iOS --linkskip=ImageCircle.Forms.Plugin.Abstractions --linkskip = ImageCircle.Forms.Plugin.iOS --linkskip = ImageCircle.Forms.Plugin.Abstractions

Add this to your platform project build options. 将此添加到您的平台项目构建选项。

Android Android的

在Android上添加链接跳过

iOS iOS版

在iOS上添加链接跳过

You should only need to add this on the Release configuration. 您只需要在Release配置中添加它。

For UWP, you just have to create a small, trivial reference to the CircleImage assembly to keep it included in a release build. 对于UWP,您只需要创建一个对CircleImage程序集的小型琐碎引用即可将其包含在发行版本中。 Add this piece of code above the Xamarin.Forms Init line: 在Xamarin.Forms Init行上方添加以下代码:

var rendererAssemblies = new[]
{
    typeof(ImageCircleRenderer).GetTypeInfo().Assembly
};
Xamarin.Forms.Forms.Init(e, rendererAssemblies);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM