Home icon indicating copy to clipboard operation
Home copied to clipboard

.NET nanoFramework Extension for VS Code v1.0.130^ missing nanoff.dll

Open Sour-Codes opened this issue 2 years ago • 18 comments

Tool

Visual Studio Code extension

Description

v1.0.30 and higher missing nanoff.dll yet nanoFramework: Flash Device from command palette attemts to use said file.

How to reproduce

  1. Install v1.0.30 or higher of the extension
  2. Attempt nanoFramework: Flash Device
  3. Be disappointed by "Possible reasons" including "\nanoframework.vscode-nanoframework-1.0.132/dist/utils/nanoFirmwareFlasher/nanoff.dll does not exist."
  4. Install v1.0.127 or older and see you aren't going insane and the file is just missing from v1.0.130 and newer

Expected behaviour

Never seeing the following:

Could not execute because the specified command or file was not found. Possible reasons for this include:

  • You misspelled a built-in dotnet command.
  • You intended to execute a .NET program, but dotnet-c:\Users\user\.vscode\extensions\nanoframework.vscode-nanoframework-1.0.132/dist/utils/nanoFirmwareFlasher/nanoff.dll does not exist.
  • You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.

Screenshots

image

Aditional context

No response

Sour-Codes avatar Nov 07 '22 21:11 Sour-Codes

I tried a cheap workaround by just copying nanoff.dll to the folder, but it's now complaining that hostpolicy.dll is missing too. I'll just stick to an older version that's working for now rather than playing the missing file lottery as don't want to expend any luck from the $1.9B lotto chance tonight.

Sour-Codes avatar Nov 07 '22 22:11 Sour-Codes

I also have this problem, and the deployment will not find the device

mimimiaomiao1 avatar Nov 11 '22 13:11 mimimiaomiao1

Linked to repo: https://github.com/nanoframework/nf-VSCodeExtension/commits/main It seems that the change between 130 and 132 was reverted, but never re-released with a later version.

networkfusion avatar Nov 13 '22 21:11 networkfusion

@josesimoes See comment above... Is it possible we can release a new extension based on that?

networkfusion avatar Nov 13 '22 21:11 networkfusion

@networkfusion maybe it's because is Monday morning for me but... what are those 130 and 132 that you're referring to? 😅

josesimoes avatar Nov 14 '22 08:11 josesimoes

@josesimoes image

Sour-Codes avatar Nov 17 '22 22:11 Sour-Codes

@josesimoes image

Hello, which version can solve this problem?

mimimiaomiao1 avatar Nov 22 '22 08:11 mimimiaomiao1

@OaimIsGnay I'm using 1.0.98 until this is resolved.

Sour-Codes avatar Nov 22 '22 17:11 Sour-Codes

image Device not found. I don't know why

mimimiaomiao1 avatar Nov 23 '22 01:11 mimimiaomiao1

Since the first attempt to solve this was blown off, is there any progress? 👯

hinnerkweiler avatar Nov 09 '23 19:11 hinnerkweiler

Found the root cause of the flash failing with the latest VS Code version. It's related to changes made in nanoff build. Now, the challenge is to have the time to fix those and do couple of tests to see which options will work best:

  • ask the user to install nanoff and add it properly to the path
  • have a specific version of nanoff install in the extension but from the dotnet tool
  • have a specific built of nanoff coming with the extension like today

The last point is what we've been using, it has quite a lot of drawbacks. So I4ll investigate the 2 first ones. We anyway ask the user to install mono, so why not nanoff as well. That would definitely simplify a lot of things.

Ellerbach avatar Nov 16 '23 14:11 Ellerbach

On my box (Ubuntu 22.04, with .Net 7 & 8 sdks installed) version 1.0.115 is the newest one that successfully builds and deploy to my ESP32 device.

btw, I've tried to change the extension to use nanoff from the .net global install folder but nanoff returns an error:

Error E2002: Error executing operation with nano device. (Couldn't find the deployment file at the specified path.)

The command line used by the extension: /home/adriano/.dotnet/tools/nanoff --nanodevice --deploy --serialport /dev/ttyUSB0 --image /home/adriano/Projects/study/DotNet/NanoframeworkTest/OutputDir/ -v d

adrianoc avatar Dec 20 '23 16:12 adrianoc

Is the vscode extension abandoned?

It seems this error is more than 1yr old.

junalmeida avatar Apr 09 '24 16:04 junalmeida

Is the vscode extension abandoned?

It seems this error is more than 1yr old.

Not abbandoned, but needs some TLC by a willing developer.

networkfusion avatar Apr 09 '24 18:04 networkfusion

Is there any viable workaround? Calling nanoff manually after a successful build with the same parameters doesn't work either, failing on a missing deployment file

junalmeida avatar Apr 10 '24 16:04 junalmeida

nanoff is working as expected... no issues reported about it. I've been using it myself without any issues. Are you on our Discord server? It's so much easy to provide support there, instead of piling comments on github issues.

josesimoes avatar Apr 10 '24 22:04 josesimoes

nanoff is working as expected... no issues reported about it. I've been using it myself without any issues. Are you on our Discord server? It's so much easy to provide support there, instead of piling comments on github issues.

Pretty sure this is on linux / MAC.

networkfusion avatar Apr 12 '24 17:04 networkfusion

@networkfusion @josesimoes yep, it doesn't work on MacOS Sonoma (intel)

junalmeida avatar May 02 '24 13:05 junalmeida