Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Step of Release compile Android apk using Visual Studio 2019

I had done my first ever app by using Visual Studio 2019 - cross platform Xamarin C#. The app is running well. Now, I want to compile it to apk file so that I can install it to the mobile phone manually. I did change the debug to release, and then right click from the android file and choose Archive. But, there is an error as below:

The preprocessor token 'rootnamespace' has been given more than one value. Choosing 'Calculator.Droid' as the value.
The preprocessor token 'assemblyname' has been given more than one value. Choosing 'Calculator.Android' as the value.
The preprocessor token 'fullpath' has been given more than one value. Choosing 'D:\Calculator\Calculator\Calculator.Android' as the value.
The preprocessor token 'outputfilename' has been given more than one value. Choosing 'Calculator.Android.dll' as the value.
The preprocessor token 'filename' has been given more than one value. Choosing 'Calculator.Android.csproj' as the value.
MSB4094: "obj\Release\81\Calculator.Android.dll;obj\Release\81\Calculator.Android.dll" is an invalid value for the "OutputAssembly" parameter of the "Csc" task. Multiple items cannot be passed into a parameter of type "Microsoft.Build.Framework.ITaskItem".
like image 296
VV Voon Avatar asked May 06 '19 13:05

VV Voon


1 Answers

For me it was caused by wrong "Android Package Signing" data in Project Properties. After fixing it went away enter image description here

like image 137
Sergiy Velychko Avatar answered Oct 13 '22 23:10

Sergiy Velychko