Resizetizer cannot find existing images
See original GitHub issueDescription
We are working on an iOS app that is consuming a nuget package, and resizetizer is having issues finding the images from the library. We are specifically getting:
Microsoft.Maui.Resizetizer.targets(531, 9): Unable to find background file: /Users/matthericks/.nuget/packages/matthericks.maui.imagepackage/0.0.1/buildTransitive/Resources/Images/checkmark.svg
at Microsoft.Maui.Resizetizer.ResizeImageInfo.Parse(IEnumerable`1 images) in D:\a\_work\1\s\src\SingleProject\Resizetizer\src\ResizeImageInfo.cs:line 67
at Microsoft.Maui.Resizetizer.ResizetizeImages.ExecuteAsync()
at Microsoft.Maui.Resizetizer.MauiAsyncTask.<Execute>b__0_0() in D:\a\_work\1\s\src\SingleProject\Resizetizer\src\MauiAsyncTask.cs:line 18
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__272_0(Object obj)
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
The image exists in the specified location:

We have followed steps here to get our library to properly pack the images.
We have also tried clearing out bin and obj folders with no improvements.
currently using .NET SDK 6.0.401
Created a public nuget package for repro: https://www.nuget.org/packages/MattHericks.MAUI.ImagePackage/
Steps to Reproduce
- Create library with images
- Consume library in another MAUI app
- note build errors in resizetizer
Expected behavior: -resizetizer can find existing images
Actual behavior:
- Resizetizer throw error saying that images cannot be found.
Link to public reproduction project repository
https://github.com/matthericks/bug_repro
Version with bug
Unknown/Other (please specify)
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iOS 15.4
Did you find any workaround?
no
Relevant log output
Microsoft.Maui.Resizetizer.targets(531, 9): Unable to find background file: /Users/matthericks/.nuget/packages/matthericks.maui.imagepackage/0.0.1/buildTransitive/Resources/Images/checkmark.svg
at Microsoft.Maui.Resizetizer.ResizeImageInfo.Parse(IEnumerable`1 images) in D:\a\_work\1\s\src\SingleProject\Resizetizer\src\ResizeImageInfo.cs:line 67
at Microsoft.Maui.Resizetizer.ResizetizeImages.ExecuteAsync()
at Microsoft.Maui.Resizetizer.MauiAsyncTask.<Execute>b__0_0() in D:\a\_work\1\s\src\SingleProject\Resizetizer\src\MauiAsyncTask.cs:line 18
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__272_0(Object obj)
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Resizetizer One or more invalid file names were detected
Simplest fix is to create a new project. Copy stuff over gradually. Other ideas: .vs hidden folder. .csproj itself. If you hadn't deleted...
Read more >Maui, files go locked and even Resource Monitor cannot ...
IOException : The process cannot access the file 'C:\Visual Stuido Stuff\Maui\DEVEXFullProject\obj\Debug\net6.0-android\resizetizer\r\drawable- ...
Read more >How-To: Get Started with Uno.Resizetizer
Configure the project to use generated Images. In the App Class library, create a folder called Assets (if doesn't exist) and then create...
Read more >,NET MAUI GIVING ERRORS AFTER UPDATING FROM ...
I have VS 2022 17.3 installed and created a lot fo MAUi APps that are working well but when i updated VS to...
Read more >NET MAUI App Stopped Working -- HELP!
Try cleaning your obj and bin folders, which might fix the current state of your project. By clean, I mean delete them from...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I had a look at the package and had to make 2 changes:
move the Resources folder under buildTransitive and then move the targets file to the root of the buildTransitive (out of the Resources)
As a general workflow thought, it would be nice if indicating that a .svg file should be packaged managed a bit of this in the background. Manually editing the project file is not ideal, and gets overwritten quite easily when files are added/changed, making maintaining this a bit of a pain.