dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
21.87k stars 1.69k forks source link

unable to debug android apps on Linux #23472

Closed MandeepSingh-MS closed 1 week ago

MandeepSingh-MS commented 2 weeks ago

Description

I am new to .NET MAUI. I setup the development environment as per the documentation.

i am using the latest version of VS Code and the required extensions for .NET MAUI. The release build is working fine.

But unable to run the debug mode. During debug mode the following error appears.

/dotnet/packs/Microsoft.Android.Sdk.Linux/34.0.113/tools/Xamarin.Android.Common.Debugging.targets(678,5): error XA0129: Error deploying 'files/.override/Microsoft.Maui.Controls.Compatibility.dll'.

/dotnet/packs/Microsoft.Android.Sdk.Linux/34.0.113/tools/Xamarin.Android.Common.Debugging.targets(678,5): error XA0129: Please set the 'EmbedAssembliesIntoApk' MSBuild property to 'true' to disable Fast Deployment in the Visual Studio project property pages, or edit the project file in a text editor.

As I am new to .NET MAUI, I tried to set the EmbedAssembliesIntoApk property. But then the following message appears in the debug console

You may only use the Microsoft Visual Studio .NET/C/C++ Debugger (vsdbg) with Visual Studio Code, Visual Studio or Visual Studio for Mac software to help you develop and test your applications.

The program 'MauiApp1.dll' has exited with code 0 (0x0).

VERSIONS

  1. dotnet = 8.0.302
  2. maui-android = Manifest version = 8.0.40/8.0.100 , Installation Source = SDK 8.0.300
  3. vs code = 1.91.0
  4. OS = LINUX (linux-mint) => Linux x64 5.15.0-41-generic
  5. .net maui extension = 1.0.6
  6. c# extension = 2.34.12
  7. c# dev kit = 1.7.27

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

Unknown/Other

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

github-actions[bot] commented 2 weeks ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

kevinxufei commented 2 weeks ago

This issue has been verified using VS Code(1.91.0) (8.0.61). Can not repro on Android platform. All extension versions are the latest release versions like users.

MandeepSingh-MS commented 2 weeks ago

Thanks for the reply.

As I mentioned, I am using the latest versions of all tools. But still the bug is here.

Here is my sample code. This code is created by running .NET create maui project command in VS Code

Sample Code

MandeepSingh-MS commented 1 week ago

I did. Closed the issue from here. Opened in the suggested repository.

Link of the issue