banditoth / maui-archiver-vscode

Visual Studio Code extension for archiving/publishing .NET MAUI applications
MIT License
40 stars 6 forks source link

Publish Android duplicate keystore paths #15

Closed MouratidisA closed 4 months ago

MouratidisA commented 4 months ago

I am trying to archive for publish my .Net Maui application for Android platforms, but I'm having a hard time signing the AAB or APK. I was using Visual Studio for Mac and I want to set up the Visual Studio Code for my application (before the retirement of Visual Studio for Mac)

I've located my android keystore path "Users/username/Library/Developer/Xamarin/Keystore/keystorename/keystorename.keystore" and setted up on the extentions settings "SCode-MAUI-Archive: Android Keystore Directory".

However, when I start the "Publish Android" process, the error below occurs:

/usr/local/share/dotnet/packs/Microsoft.Android.Sdk.Darwin/34.0.113/tools/Xamarin.Android.Common.targets(2409,2): error XA4310: $(AndroidSigningKeyStore) file Users/username/Library/Developer/Xamarin/Keystore/keystorename/Users/username/Library/Developer/Xamarin/Keystore/Keystorename/keystorename.keystore could not be found. [/Users/username/appname/appname/appname.csproj::TargetFramework=net8.0-android]

As you can see in the error, the path of the keystore is nested within itself. I've tried different paths, but nothing seems to work.

The error path /usr/local/share/dotnet/packs/Microsoft.Android.Sdk.Darwin/34.0.113/tools/Xamarin.Android.Common.targets(2409,2) navigates to:

    <AndroidSignPackage Condition=" '$(AndroidUseApkSigner)' != 'true' "
        UnsignedApk="%(ApkAbiFilesIntermediate.Identity)"
        SignedApkDirectory="$(OutDir)"
        FileSuffix="$(_JarSignerSuffix)"
        KeyStore="$(_ApkKeyStore)"
        KeyAlias="$(_ApkKeyAlias)"
        KeyPass="$(_ApkKeyPass)"
        StorePass="$(_ApkStorePass)"
        ToolPath="$(JarsignerToolPath)"
        ToolExe="$(JarsignerToolExe)"
        TimestampAuthorityUrl="$(JarsignerTimestampAuthorityUrl)"
        TimestampAuthorityCertificateAlias="$(JarsignerTimestampAuthorityCertificateAlias)"
        SigningAlgorithm="$(AndroidApkSigningAlgorithm)"
        DigestAlgorithm="$(AndroidApkDigestAlgorithm)"
    />

Environment: Visual Studio Code v1.90.2 (Universal) .Net MAUI extension v1.0.6 .NET MAUI - Archive/Publish tool v1.1.0 Android platform .net8-android iOS platform .net8-ios

I'm not sure if I missed something in the setup. Can anyone provide guidance on how to resolve this issue?

banditoth commented 4 months ago

Fixed in 1.1.1