-
-
Notifications
You must be signed in to change notification settings - Fork 89
Remove bundled nanoff in VSCode extension and use system install of nanoff tool #908
Description
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.binIn 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.
- Change
dotnettodotnetx64or/use/local/share/dotnet/x64/dotnet - Change
dotnet /PATH_TO_PLUGIN/nanoff.dlltonanoff
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.