Redth / ResizetizerNT

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

Deployment error with 0.3.0 #82

Closed TheObliterator closed 2 years ago

TheObliterator commented 3 years ago

I get a build/deployment error in my Android/iOS projects when upgrading to v0.3.0 of the plugin (v0.2.0 works fine).

Error: Resizetizer.NT.targets(305,3): error : Value cannot be null. It complains about the 'source' parameter being null.

The problem occurs even if I don't have images marked as SharedImage/ResizetizerNt build action. Happy to supply additional logs if you point me in the right direction.

r2d2rigo commented 2 years ago

I'm experiencing this too - the library seems to fail the build when there are no SharedImage assets in any of the projects.

UPDATE: turns out that just updating SkiaSharp makes it work for VS2022. I have created PR #83 to fix this but if you really need it, I also have uploaded a NuGet package here: https://github.com/rotorsoft-ltd/ResizetizerNT/releases/tag/0.3.0-vs2022

TheObliterator commented 2 years ago

@r2d2rigo That makes sense - thanks. I'd used the property editor in VS to set the base size for the images - this had updated the project entries from 'SharedImage' to 'ResizetizerNt' build action. Your null fix should resolve that nicely, but I simply manually set the build action back to 'SharedImage' which also resolved my issue.