Redth / ResizetizerNT

Add SVG's and PNG's to your shared Xamarin Project
MIT License
318 stars 31 forks source link

Xamarin Forms 5.0.0.2196 #79

Open heltonspr opened 2 years ago

heltonspr commented 2 years ago

Hello, after upgrading to xamarin forms Xamarin Forms 5.0.0.2196 and version 0.3.0, images are not loaded for IOS and Android. Downgrading the same project loads correctly. There is some additional configuration to perform. Thank you in advance.

heltonspr commented 2 years ago

Steps to reproduce the problem: 1 - create a project in the previous version of xamarin forms. 2 - add the resizetizer.NT library 3 - add the "SharedImage" images 4 - compile and test the project. everything will be ok so far. 5 - update the resizetizer and xamarin.forms libraries 6 - clean the project 7 - compile and test the project. no images will be loaded

Feroks commented 2 years ago

Have you tried deleting bin and obj folders? It usually helps me.

nll commented 2 years ago

I can confirm that updating from 0.2.0 to 0.3.0 does break existing projects, and it does not seem related with the Xamarin.Forms version. In my case it was not generating the native bitmap files after updating, even after clean / delete bin/obj folders.

I did manage to make it work by trial and error, by:

  1. adding the dependency to the native projects (Android / iOS) - <PackageReference Include="Resizetizer.NT" Version="0.3.0" />
  2. renaming the files to lowercase (as I got an error and Link="name.png" didn't work)
jor1196 commented 2 years ago

The same thing happens to me, I have the 2012 version of XF and they do not load the images

biapar commented 2 years ago

I've a msbuild error with latest Xamarin Forms 5.0.0.2196 and 0.3.0 version. All works with 0.2.0 version.

tmijieux commented 2 years ago

I've a msbuild error with latest Xamarin Forms 5.0.0.2196 and 0.3.0 version. All works with 0.2.0 version.

I've had the same problem (0.2.0 working and 0.3.0 not working) until I updated to visual studio 2022 on my windows and updated to last version of visual studio for mac + installed jdk11 on the mac) when it suddenly became the opposite(0.2.0 stopped working and 0.3.0 started working so maybe it has an implicit dependency on some part of the toolchain), like @nll said you are probably supposed to put a PackageReference to the nuget in platform specific project as well since it probably do custom stuff for each project