JaneySprings / DotNet.Meteor

A VSCode extension that can run and debug .NET apps (Xamarin, MAUI, Avalonia)
https://marketplace.visualstudio.com/items?itemName=nromanov.dotnet-meteor
MIT License
269 stars 10 forks source link

.NET Meteor does not load if no Android SDK can be found #37

Closed PurpleGranite closed 1 year ago

PurpleGranite commented 1 year ago

My use-case for this extension is to assist running a MAUI app which will run only under WinUI. I have found that the extension fails to load if there is no installed Android SDK.

To work around this, I have made the following changes to the local files for the extension (version 1.71.0):

// resources.js
exports.messageAndroidSdkNotFound = "Android SDK Path not found. Make sure you have installed a supported Android SDK.";
// tasks/build.js
...
constructor() {
  try {
    this.androidSdkDirectory = bridge_2.CommandInterface.androidSdk();
  }
  catch { 
    vscode.window.showErrorMessage(res.messageAndroidSdkNotFound);
  }
}
...

This allows the extension to keep loading, displaying a warning to the user instead of dropping an exception into the extension host log.

Logging as an issue, rather than a PR, to enable discussion and in case there is a more elegant way that loading without an installed Android SDK can be achieved.

JaneySprings commented 1 year ago

Hello! Thank you for your issue. I have already fixed this bug and will release an update soon.

JaneySprings commented 1 year ago

Fixed in 62c1ba7a47d79ed34e43af5d9e370cf4d14b87b9