Skip to content

Remove bundled nanoff in VSCode extension and use system install of nanoff tool #908

@AlisaAkiron

Description

@AlisaAkiron

nanoFramework area: Visual Studio Code Extension

Problem

I am working on a M1 chip powered MacBook. From .NET 6, dotnet command will run arm64(native) version of .NET installed in /use/local/share/dotnet/dotnet, To run some thing with x64(rosseta), you need to run /use/local/share/dotnet/x64/dotnet. So I make an alias and use dotnetx64 to run /use/local/share/dotnet/x64/dotnet and install nanoff global tool with this command and it works.

When deploy bin file to device. The extension will try to run a command like this:

dotnet /Users/liamsho/.vscode/extensions/nanoframework.vscode-nanoframework-1.0.32/dist/utils/nanoFirmwareFlasher/nanoff.dll --target ESP32_REV0 --serialport /dev/cu.usbserial-0001 --deploy --image /Users/liamsho/Documents/Program/MCU_Course_Project/OutputDir/deploy.bin

In my case it will just throw an error like this:

The framework 'Microsoft.NETCore.App', version '5.0.0' (arm64) was not found.

.NET 5 do not have a amr64 version and I only install .NET 6 in arm64 but .NET 5 and 6 in x64.

I have two ways to fix this problem.

  1. Change dotnet to dotnetx64 or /use/local/share/dotnet/x64/dotnet
  2. Change dotnet /PATH_TO_PLUGIN/nanoff.dll to nanoff

Solution

In my opinion, just remove the bundled nanoff and use the system install of nanoff tool is OK. The size of nanoff tool is pretty large, and most of developers will have a global install of it.

It will resolve my problem and also make the size of the plugin much smaller.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions