microsoft / vscode-dotnettools

This is a feedback repository to capture issues logged for the C# Dev Kit and related extensions from Visual Studio Code
Other
216 stars 9 forks source link

[BUG]Unable to debug android apps on Linux #1273

Open MandeepSingh-MS opened 1 month ago

MandeepSingh-MS commented 1 month ago

Describe the Issue

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.6.15.0-41-generic
  5. .net maui extension = 1.0.6
  6. c# extension = 2.34.12
  7. c# dev kit = 1.7.27

Sample code

Steps To Reproduce

With the provided environment information -> Create a new maui project and run the project for Android in debug mode.

Expected Behavior

App must run in the debug mode.

Environment Information

  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.6.15.0-41-generic
  5. .net maui extension = 1.0.6
  6. c# extension = 2.34.12
  7. c# dev kit = 1.7.27 | VS Bug 2137254
MandeepSingh-MS commented 1 month ago

Last I tried with new updated versions of the below extensions, but still same problem.

  1. .net maui extension= 1.1.16
  2. C# dev kit = 1.8.14