Closed rsfitzii closed 2 years ago
@rsfitzii Are you able to build a net6.0-android
application in general? Try making a new dotnet new android
app and see if that deploys.
@jonathanpeppers do you have any ideas?
Verified not repro on VS 17.3.0 Preview 1.0 [32418.321.main]. Not repro with maui sample template project.
Something might have gone wrong with NuGet downloading files. If someone hits this again, try deleting things in %userprofile%\.nuget\packages
to see if that solves the issue.
I will try that, thank you.
I tried deleted .nuget/packages and recompiled but I received the same error as before.
I also tried creating a new plain .net 6 android app and that threw the same build error.
This seems to only be android specific because I can deploy the app to the windows emulator and it compiles and runs fine.
I know it must have something to do with my particular environment but so far I'm at a loss as to what it could be. I had this happen way back with vs 2022 preview 1, but was eventually able to get it working and then once I upgraded to preview 2 it's been broken. I keep thinking a new preview will fix it but it hasn't so I'm pretty sure it's not specifically to do with Visual Studio itself.
Thanks for all your suggestions, I will keep trying different tings until something works.
@rsfitzii so you get the above error with:
dotnet new android
dotnet build -bl
If so, can you attach the msbuild.binlog
file the above command produces? If it works, do the same with dotnet new maui
.
I'm sorry I should have been more specific. This error happens when I try to create and build the project in VS 2022 Preview (at the moment I'm up to preview 4).
If I run the dotnet new/build commands from the command line, I do NOT receive that error. Both "dotnet new android" and "dotnet new maui" will build successfully.
So then we could try .NET framework MSBuild, such as:
"C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\MSBuild.exe" -restore -bl
(Check that file exists, your path could be different)
This would be how VS builds. Does that fail?
That does NOT fail either. It completes with "build successful".
Ok, so if you install this extension:
https://marketplace.visualstudio.com/items?itemName=VisualStudioProductTeam.ProjectSystemTools2022
View > Other Windows > Build Logging
can record a .binlog
you can share here. Maybe send me one that worked and then the failing one, and I can see what's different???
Awesome. Thank you for looking into it.
Attached are the two binlogs. The one marked "Fail" came from the build within VS 2022 using the Build Logger tool you sent me.
The one marked "Success" is the binlog created from the command line MSBuild that was successful.
Both were compiles of the exact same project.
Let's track this here, thanks!
Great, thanks!
Description
When building a brand new "empty" MAUI app in VS 2022 Community Preview 3, the build fails with an error that compression method is not supported. This appears to happen during _ResolveProjectLibraryImports
Steps to Reproduce
Create a new MAUI app using the MAUI app template Build and deploy to Android (have tried APIs 28, 30 and 31) Build fails with XARLP7000: Xamarin.Tools.Zip.ZipException: Compression method not supported when trying to resolve library project imports
Version with bug
Release Candidate 1 (current)
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 11, Android 12
Did you find any workaround?
Not yet
Relevant log output