When I archive my android project on VS 2019, i get error message as "Failed to create App archieve 'myApp.Android'. An item with the same key has already been added. I have recognized a difference on VS 2017 and VS 2019.
my Android project is called myApp.Android
VS 2017 archive is named myApp
VS 2019 achive is named myApp.Android
could this be the problem?
The same project can be archiving using VS 2017 without any change.
It looks like you might be seeing one of the following to issues that are under investigation on Visual Studio Developer Community:
\
Windows path separator character was reported to help with the behavior.I would recommend to vote on the issue that best matches your scenario to help the team with extra data about the affected users, and I would also recommend to follow the item to be notified about additional updates and the resolution.
Answers
Same thing is happen to me, I also tried to remove all "bin" "obj" directories, but it did'nt help. The only solution is to switch back to vs2017
I wonder how the others are able to work with VS 2019 or we have exceptional case here. can someone confirm with success? or that just occurs for old projects
It looks like you might be seeing one of the following to issues that are under investigation on Visual Studio Developer Community:
\
Windows path separator character was reported to help with the behavior.I would recommend to vote on the issue that best matches your scenario to help the team with extra data about the affected users, and I would also recommend to follow the item to be notified about additional updates and the resolution.
first one looks like my issue on Android and good that it was identified. i can use VS2017 to create package until an update is release. But i think that there is even issue to run xamarin apps in release mode. Other day i have run my app in release mode on my android phone and app was crashing at the start up. I had tried to build and test using appcenter and it had same issue. I wonder if appcenter builds are done the way VS2019 is doing. Then I opened the app in VS207 without any single change and just run it same way in release, it was all fine working. I have retest and verify this.
I started facing the same issue when I bumped up the version. I closed Visual Studio, removed Obj and Bin Folders. Created a new build and then archived; that solved my problem.
I hope that helps someone.
Please dont reply old posts. it just unnecessarily ups this post for which nobody needs a solution. This problem was earlier release problem with VS2019 and VS team is almost doing every another month an update for VS. so such problems are possibly solved. Deleting obj, bin folders and rebuilding is the mother of all annoying problems but this wasnt one of them as others stated.