Closed CameronVetter closed 1 year ago
Getting Publish to work again after removing the package was pretty hard. I had to shut down visual studio, delete all obj and bin folders by hand, then do a clean and rebuild before publish would work again. After doing this I can verify that removing this package allowed the app to publish again.
I was able to get back to this problem today. The issue is that the file path is getting too long. After a bunch of research I figured out that the maximum length for the win32 API call (yes really) called during the publish process is 260 characters, in the chunk I shared that was up to 263 characters. I moved the Archives folder (in VS2022 options) to a shorter folder length and it worked just fine.
I'm not sure I have a great answer on what could change in this code base to fix this... But at least this is an answer for the next person, so they don't waste as many hours as I did.
I experienced this problem as well locally while working with Admob library. Workaround for this is to setup registry for windows: https://www.autodesk.com/support/technical/article/caas/sfdcarticles/sfdcarticles/The-Windows-10-default-path-length-limitation-MAX-PATH-is-256-characters.html
I reported similar issue(with mentioned Admob library) here: https://github.com/dotnet/maui/issues/15042
The best thing to have is to automate whole deployment process through github/azure pipelines. I had a lot of problems with local artifacts as well, but pipelines always start on fresh machine so now I dont deploy from my PC anything.
I did start setting up pipelines, but ran into so many MAUI problems that I gave up, I'll have to give it another try. I tried to track through that issue, but couldn't follow all the related issues, did they actually fix it in .net8?
MAUI problems ? I didnt experience anything other than problems regarding iOS certificates (it took me a while to set it up properly).
Regarding that issue, I have no idea, it went through so many other issues I also lost track of that.
@CameronVetter can I close this issue ? Because it is caused by MAUI itself so we cant do anything with this
The app deploys fine in debug or release to devices from VS2022, but when publishing the app for IOS the IDE shows that the packaging has completed but the progress bar keeps going forever (just tried it over night). The packaging works fine for Android. When I look at the archives folder I find that there is an archive there with most of the files there. In VS 2022 after restarting when I "view archives" no archives appear (I believe VS is throwing an exception). Deleting the folder for the new archive and restarting VS2022 allows it to return to normal.
The only clue is looking in the Xamarin logs where I see this: