Using VS22 Xamarin
wickshot opened this issue ยท 12 comments
๐ Bug Report
When I add the NuGet package and the try to run on the iPhone I get the error below.
The "UnpackFrameworks" task failed unexpectedly.
System.IO.IOException: The file 'obj\iPhone\Debug\device-builds\iphone7.2-12.5.5/Frameworks\FirebaseMessaging.framework\FirebaseMessaging' already exists.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
at System.IO.FileInfo.CopyTo(String destFileName)
at Xamarin.iOS.Tasks.Windows.Zip.CopyDirectory(String source, String destination) in /Users/builder/azdo/_work/1/s/xamarin-macios/msbuild/Xamarin.iOS.Tasks.Windows/Zip.cs:line 32
at Xamarin.iOS.Tasks.Windows.Zip.Extract(String sourceFileName, String destinationPath) in /Users/builder/azdo/_work/1/s/xamarin-macios/msbuild/Xamarin.iOS.Tasks.Windows/Zip.cs:line 18
at Xamarin.iOS.HotRestart.Tasks.UnpackFrameworks.Execute() in /Users/builder/azdo/_work/1/s/xamarin-macios/msbuild/Xamarin.iOS.Tasks.Windows/Tasks/UnpackHotRestartFrameworks.cs:line 55
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() AppTest.iOS
NuGet V3.4.25, I have tried previous version same result.
The Android compiles and deploys without issues
Platform:
- ๐ฑ iOS
Do you try to delete obj and bin folders via file manager?
Same here... Do you found a workaround?
Found a discussion about it:
No, not yet, started coding in swift!
Do you try to delete obj and bin folders via file manager?
Yes, tried this, same result
Do you try to delete obj and bin folders via file manager?
Yes, tried this, same result
Try disable hot restart and/or hot reload.
Do you have manually installed some Xamarin.Firebase.* nugets?
The path in your error message looks crazy. Mixed with slashe and backslashes.
No, no other firebase nuggets installed. I've even tried installing on a new clean project, same result when I try to run on iOS
I guess its a dependency problem by xamarin/GoogleApisForiOSComponents#564 in which this package needs to be updated asap.
I updated the following nugets (ios Project) via Transitive packages to version 8.10:
<PackageReference Include="Xamarin.Firebase.iOS.CloudMessaging"> <Version>8.10.0</Version> </PackageReference> <PackageReference Include="Xamarin.Firebase.iOS.Installations"> <Version>8.10.0</Version> </PackageReference>
Every time i need to delete obj folder via explorer to compile successfully.
Another workaround is to edit Xamarin.iOS.HotRestart.targets file:
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Xamarin\iOS\Xamarin.iOS.HotRestart.targets
Path depends on your VS version.
Search UnpackFrameworks node and add ContinueOnError="true". Like this:
<UnpackFrameworks ContinueOnError="true"
ReferencedAssemblies="@(AssembliesWithFrameworks)"
IntermediateOutputPath="$(DeviceSpecificIntermediateOutputPath)">
<Output TaskParameter="Frameworks" ItemName="_UnpackedFramework" />
</UnpackFrameworks>
I don't have an UnpackFrameworks node in my Xamarin.iOS.HotRestart.targets. Where in the file should this setting live?
ffs, i have nothing but problems trying to develop a very simple app using Xamarin / MAUI, think I'll switch to react native this has been the last straw tbh
WebcomCompany
Use Other Platforms Look like 'onesignal'
I have Same problem and I became the axis of change