Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intermittent System.IO Errors During Build, Rebuild, and Clean Operations #110328

Closed
tj-devel709 opened this issue Dec 2, 2024 · 4 comments
Closed
Labels
needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners

Comments

@tj-devel709
Copy link
Member


Issue moved from dotnet/maui#26316


From @vsfeedback on Monday, December 2, 2024 7:46:38 PM

This issue has been moved from a ticket on Developer Community.


[severity:It bothers me. A fix would be nice]
Hello,

I am encountering an intermittent issue with Visual Studio 2022 during the build, rebuild, and clean operations for any project. The problem does not occur consistently, but when it happens, it throws System.IO errors such as:
"File in use by another process"
"The directory is not empty"
These errors are unpredictable and can happen across various projects. Often, simply retrying the operation (build, rebuild, or clean) resolves the issue.

Here are some additional details about the problem:

  • The issue appears with any project type.
  • It occurs regardless of whether I am building, rebuilding, or cleaning the project.
  • No other applications seem to be accessing the files in question when the error occurs.

This is an example of log:

10:39:04:536	Compilazione avviata alle 10:39...
10:39:05:489	1>------ Inizio compilazione: Progetto: TTIG02_Controller, Configurazione: Debug Any CPU ------
10:39:05:495	D:\Sviluppo\Iglo\TTIG02\APP\TTIG02_Controller\TTIG02_Controller\TTIG02_Controller.csproj ripristinato (in 442 ms).
10:39:06:115	1>D:\Sviluppo\Iglo\TTIG02\APP\TTIG02_Controller\TTIG02_Controller\TTIG02_Controller.csproj : warning NU1608: È stata rilevata una versione del pacchetto all'esterno del vincolo di dipendenza: Xamarin.AndroidX.Lifecycle.Runtime.Ktx 2.8.5.1 richiede Xamarin.AndroidX.Lifecycle.Runtime (>= 2.8.5.1 && < 2.8.6) ma è stata risolta la versione Xamarin.AndroidX.Lifecycle.Runtime 2.8.6.
10:39:06:115	1>D:\Sviluppo\Iglo\TTIG02\APP\TTIG02_Controller\TTIG02_Controller\TTIG02_Controller.csproj : warning NU1608: È stata rilevata una versione del pacchetto all'esterno del vincolo di dipendenza: Xamarin.AndroidX.Lifecycle.Runtime.Ktx.Android 2.8.5.1 richiede Xamarin.AndroidX.Lifecycle.Runtime (>= 2.8.5.1 && < 2.8.6) ma è stata risolta la versione Xamarin.AndroidX.Lifecycle.Runtime 2.8.6.
10:39:06:298	1>La sintassi del nome del file, della directory o del volume non è corretta.
10:39:06:861	1>Inizio script di versionamento automatico per Android
10:39:06:920	1>Percorso del file AndroidManifest.xml: D:\Sviluppo\Iglo\TTIG02\APP\TTIG02_Controller\TTIG02_Controller\scripts\.. \Platforms\Android\AndroidManifest.xml
10:39:06:920	1>Percorso del file AppSettings.resx: D:\Sviluppo\Iglo\TTIG02\APP\TTIG02_Controller\TTIG02_Controller\scripts\.. \AppSettings.resx
10:39:07:036	1>Valore di versionCode: 24
10:39:07:036	1>Valore di versionName: Alpha 0.7.7
10:39:07:036	1>Fine script di versionamento automatico per Android
10:39:08:236	1>C:\Users\ilcon\.nuget\packages\microsoft.maui.resizetizer\8.0.92\buildTransitive\Microsoft.Maui.Resizetizer.After.targets(631,9): error MAUI0000: There was an exception processing the image 'D:\Sviluppo\Iglo\TTIG02\APP\TTIG02_Controller\TTIG02_Controller\Resources\Images\icon_setting_membership.svg': System.IO.IOException: Il processo non può accedere al file 'D:\Sviluppo\Iglo\TTIG02\APP\TTIG02_Controller\TTIG02_Controller\obj\Debug\net8.0-android34. 0\resizetizer\r\drawable-xxxhdpi\icon_setting_membership.png' perché è in uso da un altro processo.
10:39:08:236	1>C:\Users\ilcon\.nuget\packages\microsoft.maui.resizetizer\8.0.92\buildTransitive\Microsoft.Maui.Resizetizer.After.targets(631,9): error MAUI0000:    in System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
10:39:08:236	1>C:\Users\ilcon\.nuget\packages\microsoft.maui.resizetizer\8.0.92\buildTransitive\Microsoft.Maui.Resizetizer.After.targets(631,9): error MAUI0000:    in System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
10:39:08:236	1>C:\Users\ilcon\.nuget\packages\microsoft.maui.resizetizer\8.0.92\buildTransitive\Microsoft.Maui.Resizetizer.After.targets(631,9): error MAUI0000:    in System.IO.FileStream.. ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
10:39:08:236	1>C:\Users\ilcon\.nuget\packages\microsoft.maui.resizetizer\8.0.92\buildTransitive\Microsoft.Maui.Resizetizer.After.targets(631,9): error MAUI0000:    in Microsoft.Maui.Resizetizer.SkiaSharpTools.Save(String destination, SKBitmap tempBitmap) in /_/src/SingleProject/Resizetizer/src/SkiaSharpTools.cs:riga 153
10:39:08:236	1>C:\Users\ilcon\.nuget\packages\microsoft.maui.resizetizer\8.0.92\buildTransitive\Microsoft.Maui.Resizetizer.After.targets(631,9): error MAUI0000:    in Microsoft.Maui.Resizetizer.SkiaSharpTools.Resize(DpiPath dpi, String destination, Double additionalScale, Boolean dpiSizeIsAbsolute) in /_/src/SingleProject/Resizetizer/src/SkiaSharpTools.cs:riga 74
10:39:08:236	1>C:\Users\ilcon\.nuget\packages\microsoft.maui.resizetizer\8.0.92\buildTransitive\Microsoft.Maui.Resizetizer.After.targets(631,9): error MAUI0000:    in Microsoft.Maui.Resizetizer.Resizer.Resize(DpiPath dpi, String inputsFile) in /_/src/SingleProject/Resizetizer/src/Resizer.cs:riga 107
10:39:08:236	1>C:\Users\ilcon\.nuget\packages\microsoft.maui.resizetizer\8.0.92\buildTransitive\Microsoft.Maui.Resizetizer.After.targets(631,9): error MAUI0000:    in Microsoft.Maui.Resizetizer.ResizetizeImages.ProcessImageResize(ResizeImageInfo img, DpiPath[] dpis, ConcurrentBag`1 resizedImages) in /_/src/SingleProject/Resizetizer/src/ResizetizeImages.cs:riga 240
10:39:08:236	1>C:\Users\ilcon\.nuget\packages\microsoft.maui.resizetizer\8.0.92\buildTransitive\Microsoft.Maui.Resizetizer.After.targets(631,9): error MAUI0000:    in Microsoft.Maui.Resizetizer.ResizetizeImages.<>c__DisplayClass34_0. <ExecuteAsync>b__0(ResizeImageInfo img) in /_/src/SingleProject/Resizetizer/src/ResizetizeImages.cs:riga 74
10:39:08:552	1>C:\Users\ilcon\.nuget\packages\microsoft.maui.resizetizer\8.0.92\buildTransitive\Microsoft.Maui.Resizetizer.After.targets(631,9): error MAUI0000: There was an exception processing the image 'D:\Sviluppo\Iglo\TTIG02\APP\TTIG02_Controller\TTIG02_Controller\Resources\Images\img_wip.svg': System.IO.IOException: Il processo non può accedere al file 'D:\Sviluppo\Iglo\TTIG02\APP\TTIG02_Controller\TTIG02_Controller\obj\Debug\net8.0-android34.0\resizetizer\r\ drawable-xxhdpi\img_wip.png' perché è in uso da un altro processo.
10:39:08:552	1>C:\Users\ilcon\.nuget\packages\microsoft.maui.resizetizer\8.0.92\buildTransitive\Microsoft.Maui.Resizetizer.After.targets(631,9): error MAUI0000:    in System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
10:39:08:552	1>C:\Users\ilcon\.nuget\packages\microsoft.maui.resizetizer\8.0.92\buildTransitive\Microsoft.Maui.Resizetizer.After.targets(631,9): error MAUI0000:    in System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
10:39:08:552	1>C:\Users\ilcon\.nuget\packages\microsoft.maui.resizetizer\8.0.92\buildTransitive\Microsoft.Maui.Resizetizer.After.targets(631,9): error MAUI0000:    in System.IO.FileStream.. ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
10:39:08:552	1>C:\Users\ilcon\.nuget\packages\microsoft.maui.resizetizer\8.0.92\buildTransitive\Microsoft.Maui.Resizetizer.After.targets(631,9): error MAUI0000:    in Microsoft.Maui.Resizetizer.SkiaSharpTools.Save(String destination, SKBitmap tempBitmap) in /_/src/SingleProject/Resizetizer/src/SkiaSharpTools.cs:riga 153
10:39:08:552	1>C:\Users\ilcon\.nuget\packages\microsoft.maui.resizetizer\8.0.92\buildTransitive\Microsoft.Maui.Resizetizer.After.targets(631,9): error MAUI0000:    in Microsoft.Maui.Resizetizer.SkiaSharpTools.Resize(DpiPath dpi, String destination, Double additionalScale, Boolean dpiSizeIsAbsolute) in /_/src/SingleProject/Resizetizer/src/SkiaSharpTools.cs:riga 74
10:39:08:552	1>C:\Users\ilcon\.nuget\packages\microsoft.maui.resizetizer\8.0.92\buildTransitive\Microsoft.Maui.Resizetizer.After.targets(631,9): error MAUI0000:    in Microsoft.Maui.Resizetizer.Resizer.Resize(DpiPath dpi, String inputsFile) in /_/src/SingleProject/Resizetizer/src/Resizer.cs:riga 107
10:39:08:552	1>C:\Users\ilcon\.nuget\packages\microsoft.maui.resizetizer\8.0.92\buildTransitive\Microsoft.Maui.Resizetizer.After.targets(631,9): error MAUI0000:    in Microsoft.Maui.Resizetizer.ResizetizeImages.ProcessImageResize(ResizeImageInfo img, DpiPath[] dpis, ConcurrentBag`1 resizedImages) in /_/src/SingleProject/Resizetizer/src/ResizetizeImages.cs:riga 240
10:39:08:552	1>C:\Users\ilcon\.nuget\packages\microsoft.maui.resizetizer\8.0.92\buildTransitive\Microsoft.Maui.Resizetizer.After.targets(631,9): error MAUI0000:    in Microsoft.Maui.Resizetizer.ResizetizeImages.<>c__DisplayClass34_0. <ExecuteAsync>b__0(ResizeImageInfo img) in /_/src/SingleProject/Resizetizer/src/ResizetizeImages.cs:riga 74
10:39:08:571	1>Compilazione progetto "TTIG02_Controller.csproj" NON COMPLETATA.
10:39:08:586	========== Compilazione: 0 completato/i, 1 non riuscito/i, 0 aggiornato/i, 0 ignorato/i ==========
10:39:08:586	========== Compilazione completato alle 10:39 e ha richiesto 04,081 secondi ==========

Or:

10:46:17:386	Ricompilazione avviata alle 10:46...
10:46:18:403	1>------ Inizio ricompilazione: Progetto: TTIG02_Controller, Configurazione: Debug Any CPU ------
10:46:18:543	D:\Sviluppo\Iglo\TTIG02\APP\TTIG02_Controller\TTIG02_Controller\TTIG02_Controller.csproj ripristinato (in 473 ms).
10:46:20:719	1>C:\Users\ilcon\.nuget\packages\microsoft.maui.resizetizer\8.0.92\buildTransitive\Microsoft.Maui.Resizetizer.After.targets(899,9): error MSB3231: non è possibile rimuovere la directory "obj\Debug\net8.0-android34.0\resizetizer\". Il processo non può accedere al file 'icon_device_blestate_outofrange.png' perché è in uso da un altro processo.
10:46:20:719	1>Compilazione progetto "TTIG02_Controller.csproj" NON COMPLETATA.
10:46:20:731	========== Ricompila tutto: 0 completato/i, 1 non riuscito/i, 0 ignorato/i ==========
10:46:20:731	========== Ricompila completato alle 10:46 e ha richiesto 03,364 secondi ==========

Thank you for your assistance!


Original Comments

Feedback Bot on 11/27/2024, 07:43 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Dec 2, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Dec 2, 2024
@TimothyFran
Copy link

Let me know if you need more information

@jeffschwMSFT
Copy link
Member

@tj-devel709 this looks like a Maui SDK issue. What area within dotnet/runtime do you feel is appropriate to take a look?

@jeffschwMSFT
Copy link
Member

@tj-devel709 please move this issue to Maui, I do not have the permissions to do so

@tj-devel709
Copy link
Member Author

This issue was moved to dotnet/maui#26517

@dotnet-policy-service dotnet-policy-service bot removed the untriaged New issue has not been triaged by the area owner label Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners
Projects
None yet
Development

No branches or pull requests

3 participants