Can't Archive a Xamarin.Forms Application

SkyFire 26 Reputation points
2021-04-20T01:51:27.03+00:00

I'm trying to build a distribution-ready apk for a project i've been working on recently using Xamarin.Forms and Visual Studio 2019. However, i can't get past the Archiving Stage because i keep getting below error as stated by Visual Studio itself:

enter image description here

Its worth noting that i have not changed anything yet on the project properties and the solution is stored on a relatively short path of D:\Repository\QR Code Attendance. If i am to guess, this is an issue with PATH limited to 255 characters? If so, how would i be able to overcome it?

Just copying the apk from the \Debug Folder and installing it on a Android Phone doesnt work. The app just closes as soon as it starts.

Developer technologies .NET Xamarin
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2021-04-20T07:16:36.753+00:00

    Hello,​

    Welcome to our Microsoft Q&A platform!

    The Archives are not in the solution folder. Your Archives folder is in C:/User/Administrator/App Data/Local/Xamarin/Mono for Android/Archives. You shoud change it to something shorter, like C:/Archives. This can be done in Tools -> Options -> Xamarin -> Android Settings -> Archives Location.

    adamm in this thread answer it: https://stackoverflow.com/questions/67171434/cant-archive-a-xamarin-forms-application

    Best Regards,

    Leon Lu


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.