Resizetizer error where appicon_background.png is in use by another process #12653
Labels
area-single-project
Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer
s/needs-repro
Attach a solution or code which reproduces the issue
t/bug
Something isn't working
This issue has been moved from a ticket on Developer Community.
When this happens a restart of VS2022 usually resolves it, but not always.
Error is:
/usr/local/share/dotnet/packs/Microsoft.Maui.Resizetizer.Sdk/6.0.424/targets/Microsoft.Maui.Resizetizer.targets(9,9): Error MAUI0000: System.IO.IOException: The process cannot access the file '/Users/dfgdgdf/Projects/maui-samples/6.0/PlatformIntegration/InvokePlatformCodeDemos/InvokePlatformCodeDemos/obj/Debug/net6.0-android/resizetizer/r/mipmap-mdpi/appicon_background.png' because it is being used by another process.
at Microsoft.Win32.SafeHandles.SafeFileHandle.Init(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
at System.IO.File.Create(String path)
at Microsoft.Maui.Resizetizer.SkiaSharpTools.Save(String destination, SKBitmap tempBitmap) in D:\a_work\1\s\src\SingleProject\Resizetizer\src\SkiaSharpTools.cs:line 143
at Microsoft.Maui.Resizetizer.SkiaSharpTools.Resize(DpiPath dpi, String destination, Double additionalScale, Boolean dpiSizeIsAbsolute) in D:\a_work\1\s\src\SingleProject\Resizetizer\src\SkiaSharpTools.cs:line 64
at Microsoft.Maui.Resizetizer.AndroidAdaptiveIconGenerator.ProcessBackground(List
1 results, DirectoryInfo fullIntermediateOutputPath) in D:\a\_work\1\s\src\SingleProject\Resizetizer\src\AndroidAdaptiveIconGenerator.cs:line 53 at Microsoft.Maui.Resizetizer.AndroidAdaptiveIconGenerator.Generate() in D:\a\_work\1\s\src\SingleProject\Resizetizer\src\AndroidAdaptiveIconGenerator.cs:line 41 at Microsoft.Maui.Resizetizer.ResizetizeImages.ProcessAppIcon(ResizeImageInfo img, ConcurrentBag
1 resizedImages) in D:\a_work\1\s\src\SingleProject\Resizetizer\src\ResizetizeImages.cs:line 133at Microsoft.Maui.Resizetizer.ResizetizeImages.<>c__DisplayClass26_0.b__0(ResizeImageInfo img) in D:\a_work\1\s\src\SingleProject\Resizetizer\src\ResizetizeImages.cs:line 56
at Microsoft.Maui.Resizetizer.AsyncTaskExtensions.<>c__DisplayClass0_0`1.b__0(TSource s) in D:\a_work\1\s\src\SingleProject\Resizetizer\src\AsyncTaskExtensions.cs:line 21 (MAUI0000) (InvokePlatformCodeDemos)
Original Comments
Feedback Bot on 9/4/2022, 07:46 PM:
(private comment, text removed)
Paul Wang [MSFT] on 9/5/2022, 02:36 AM:
(private comment, text removed)
John Hair on 9/14/2022, 00:15 PM:
(private comment, text removed)
John Hair on 9/15/2022, 02:29 PM:
(private comment, text removed)
Feedback Bot on 9/13/2022, 08:31 PM:
(private comment, text removed)
Paul Wang [MSFT] on 9/14/2022, 07:36 PM:
(private comment, text removed)
Feedback Bot on 9/15/2022, 07:31 PM:
(private comment, text removed)
Feedback Bot on 1/4/2023, 10:31 PM:
(private comment, text removed)
Original Solutions
(no solutions)
The text was updated successfully, but these errors were encountered: