Failed to upload application APK file to device

I have a NET MAUI app that I am working on, and with Rider 2025.3.0.1, I get an error message.  

Error running ‘MyApplicationName’
Failed to upload application APK file to device. 

This happens with both the Mac and Windows Rider.  This is with .NET 10, version 10.0.100

The solution has two projects: an Android Binding Library that wraps a .aar library that I wrote with Android Studio, and a .NET MAUI application that uses that library.

With Visual Studio 2026 on Windows 11, I can debug the app on my Android Phone.  On the Mac, I can use dotnet run to launch the app on my phone.  I can debug the app from VS Code on the Mac. The only place it is failing is with Rider.

I can debug simple MAUI apps created from scratch from the MAUI app template with Rider. So far it's just one app that is failing

The only thing that jumps out is that I get an “Ambiguous invocation” error in the IDE for one of my ContentPages.  It's for the InitializeComponent() call in the constructor. The error is 

Ambiguous invocation.
Candidates are:
  InitializeComponent() 
  InitializeComponent() 
  all from class CardView

After that, there are 26 Ambiguous Reference errors, one for each reference to a control.  This only shows up in the IDE, and the app builds without any errors.  This only happens for one ContentPage.  When the solution is open in Visual Studio, there are no errors.

How can I resolve this so that I can use Rider to debug this app?

2
2 comments

Hello Chris Miller ,

Thank you for reaching Rider Forum.

You seem to face a known issue with ID:

RIDER-132426 Rider can't find ApplicationID in the Android manifest file (only in .csproj)

Could you please try modifying .csproj accordingly, so the ApplicationId looks like the one below?

<ApplicationId Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">com.companyname.AndroidApp</ApplicationId>
<ApplicationId Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">com.companyname.iOSApp</ApplicationId>

Looking forward to hearing from you soon.

0

Please sign in to leave a comment.