Description
Cannot create archive since it fails to unzip because it includes the link to local drive for some reason.
I couldn't get a detailed reason why until I build it using a terminal this is the error it gave me:
C:\Program Files\dotnet\packs\Microsoft.iOS.Windows.Sdk\17.0.8490\tools\msbuild\iOS\Xamarin.iOS.Common.After.targets(12
1,3): error MSB4018: The "Unzip" task failed unexpectedly. [C:\Workspace\FessMobile\FessFr\FessXamarin\FessXamarin.cspr
oj::TargetFramework=net8.0-ios]
C:\Program Files\dotnet\packs\Microsoft.iOS.Windows.Sdk\17.0.8490\tools\msbuild\iOS\Xamarin.iOS.Common.After.targets(12
1,3): error MSB4018: System.IO.IOException: The filename, directory name, or volume label syntax is incorrect. : 'C:\Us
ers\lt0zcrk\AppData\Local\Xamarin\iOS\Archives\2024-01-15\FessXamarin 1-15-24 4.26 PM.xcarchive\Products\Applications\F
essXamarin.app\C:\' [C:\Workspace\FessMobile\FessFr\FessXamarin\FessXamarin.csproj::TargetFramework=net8.0-ios]
C:\Program Files\dotnet\packs\Microsoft.iOS.Windows.Sdk\17.0.8490\tools\msbuild\iOS\Xamarin.iOS.Common.After.targets(12
1,3): error MSB4018: at System.IO.FileSystem.CreateDirectory(String fullPath, Byte[] securityDescriptor) [C:\Workspa
ce\FessMobile\FessFr\FessXamarin\FessXamarin.csproj::TargetFramework=net8.0-ios]
C:\Program Files\dotnet\packs\Microsoft.iOS.Windows.Sdk\17.0.8490\tools\msbuild\iOS\Xamarin.iOS.Common.After.targets(12
1,3): error MSB4018: at System.IO.Directory.CreateDirectory(String path) [C:\Workspace\FessMobile\FessFr\FessXamarin
\FessXamarin.csproj::TargetFramework=net8.0-ios]
C:\Program Files\dotnet\packs\Microsoft.iOS.Windows.Sdk\17.0.8490\tools\msbuild\iOS\Xamarin.iOS.Common.After.targets(12
1,3): error MSB4018: at Xamarin.MacDev.CompressionHelper.TryDecompressUsingSystemIOCompression(TaskLoggingHelper log
, String zip, String resource, String decompressionDir) in /Users/builder/azdo/_work/1/s/xamarin-macios/msbuild/Xamarin
.MacDev.Tasks/Decompress.cs:line 200 [C:\Workspace\FessMobile\FessFr\FessXamarin\FessXamarin.csproj::TargetFramework=ne
t8.0-ios]
C:\Program Files\dotnet\packs\Microsoft.iOS.Windows.Sdk\17.0.8490\tools\msbuild\iOS\Xamarin.iOS.Common.After.targets(12
1,3): error MSB4018: at Xamarin.MacDev.CompressionHelper.TryDecompress(TaskLoggingHelper log, String zip, String res
ource, String decompressionDir, List`1 createdFiles, String& decompressedResource) in /Users/builder/azdo/_work/1/s/xam
arin-macios/msbuild/Xamarin.MacDev.Tasks/Decompress.cs:line 104 [C:\Workspace\FessMobile\FessFr\FessXamarin\FessXamarin
.csproj::TargetFramework=net8.0-ios]
C:\Program Files\dotnet\packs\Microsoft.iOS.Windows.Sdk\17.0.8490\tools\msbuild\iOS\Xamarin.iOS.Common.After.targets(12
1,3): error MSB4018: at Xamarin.MacDev.Tasks.Unzip.ExecuteLocally() in /Users/builder/azdo/_work/1/s/xamarin-macios/
msbuild/Xamarin.MacDev.Tasks/Tasks/Unzip.cs:line 61 [C:\Workspace\FessMobile\FessFr\FessXamarin\FessXamarin.csproj::Tar
getFramework=net8.0-ios]
C:\Program Files\dotnet\packs\Microsoft.iOS.Windows.Sdk\17.0.8490\tools\msbuild\iOS\Xamarin.iOS.Common.After.targets(12
1,3): error MSB4018: at Xamarin.MacDev.Tasks.Unzip.Execute() in /Users/builder/azdo/_work/1/s/xamarin-macios/msbuild
/Xamarin.MacDev.Tasks/Tasks/Unzip.cs:line 43 [C:\Workspace\FessMobile\FessFr\FessXamarin\FessXamarin.csproj::TargetFram
ework=net8.0-ios]
C:\Program Files\dotnet\packs\Microsoft.iOS.Windows.Sdk\17.0.8490\tools\msbuild\iOS\Xamarin.iOS.Common.After.targets(12
1,3): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute
() [C:\Workspace\FessMobile\FessFr\FessXamarin\FessXamarin.csproj::TargetFramework=net8.0-ios]
C:\Program Files\dotnet\packs\Microsoft.iOS.Windows.Sdk\17.0.8490\tools\msbuild\iOS\Xamarin.iOS.Common.After.targets(12
1,3): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecution
Host, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)
[C:\Workspace\FessMobile\FessFr\FessXamarin\FessXamarin.csproj::TargetFramework=net8.0-ios]
The main part being:
System.IO.IOException: The filename, directory name, or volume label syntax is incorrect. : 'C:\Us
ers\lt0zcrk\AppData\Local\Xamarin\iOS\Archives\2024-01-15\FessXamarin 1-15-24 4.26 PM.xcarchive\Products\Applications\F
essXamarin.app\C:\'
I was really confused why is there 'C:' in the end of it so opened the archive manually to look at it:

And there it is a link to local drive, it's obviously the reason the unzipping fails, but how it gets included in the archive I have not the slightest clue.
Tried with Maui 8.0.3, 8.05-preview.9747, VS studio 17.8.4, 17.8.3 and 17.8.0
Issue is very similar to #3777 except I don't have the file that was causing the issue that time, in my solution at all.
Steps to Reproduce
- Build it
- Attempt to Publish it fails even if build is successful
Link to public reproduction project repository
No response
Version with bug
8.0.3
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
7.0.0
Affected platforms
iOS
Affected platform versions
iOS 17
Did you find any workaround?
Not yet
Relevant log output
No response
Description
Cannot create archive since it fails to unzip because it includes the link to local drive for some reason.
I couldn't get a detailed reason why until I build it using a terminal this is the error it gave me:
The main part being:
I was really confused why is there 'C:' in the end of it so opened the archive manually to look at it:
And there it is a link to local drive, it's obviously the reason the unzipping fails, but how it gets included in the archive I have not the slightest clue.
Tried with Maui 8.0.3, 8.05-preview.9747, VS studio 17.8.4, 17.8.3 and 17.8.0
Issue is very similar to #3777 except I don't have the file that was causing the issue that time, in my solution at all.
Steps to Reproduce
Link to public reproduction project repository
No response
Version with bug
8.0.3
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
7.0.0
Affected platforms
iOS
Affected platform versions
iOS 17
Did you find any workaround?
Not yet
Relevant log output
No response