edge icon indicating copy to clipboard operation
edge copied to clipboard

EdgeJS and VSCode

Open mat-mcloughlin opened this issue 8 years ago • 13 comments

Hey Guys,

This might be a bit of stab in the dark but I'm looking for some helping regarding calling out to EdgeJS from VSCode for a small project I'm working on

I imagine the problem is regarding recompiling but I'm not sure where to go. So any help would be appreciated

The error I'm currently getting is

Activating extension `test` failed: %1 is not a valid Win32 application.
c:\Git\test\node_modules\edge\lib\native\win32\ia32\4.1.1\edge_nativeclr.node.
Activating extension `test` failed:  %1 is not a valid Win32 application.
c:\Git\test\node_modules\edge\lib\native\win32\ia32\4.1.1\edge_nativeclr.node
Here is the error stack:  Error: %1 is not a valid Win32 application.
c:\Git\test\node_modules\edge\lib\native\win32\ia32\4.1.1\edge_nativeclr.node
    at Error (native)
    at Object.module.(anonymous function) (ATOM_SHELL_ASAR.js:140:20)
    at Object.module.(anonymous function) [as .node] (ATOM_SHELL_ASAR.js:140:20)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.n._load (c:\Program Files (x86)\Microsoft VS Code\resources\app\out\vs\workbench\node\pluginHostProcess.js:20:23186)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (c:\Git\test\node_modules\edge\lib\edge.js:48:8)
    at Module._compile (module.js:434:26)

Thanks,

mat-mcloughlin avatar May 05 '16 16:05 mat-mcloughlin

What app are you building? Is this regular desktop CLR app, a CoreCLR app, or something else?

tjanczuk avatar May 05 '16 22:05 tjanczuk

Ah I may not have been clear in my description. This a VsCode extension that I am building

mat-mcloughlin avatar May 06 '16 14:05 mat-mcloughlin

Any updates on this thread?

Huachao avatar Jul 20 '16 02:07 Huachao

Hey guys: I have got a same error ,have you solved this problem?

928PJY avatar Jul 20 '16 02:07 928PJY

utimatley I ended up approaching my problem in a different way and build a console app in which to communicate with

mat-mcloughlin avatar Jul 20 '16 09:07 mat-mcloughlin

@mat-mcloughlin, can this way work cross-platform?

Huachao avatar Jul 20 '16 09:07 Huachao

It can, depending on how you build it, but takes more effort. Take a look at the https://github.com/OmniSharp/omnisharp-roslyn project for some examples. Starting up the console application and then communicating with it via stdin and stdout

mat-mcloughlin avatar Jul 20 '16 10:07 mat-mcloughlin

So we can achieve this by writing the cross platform application based on .Net Core?

Huachao avatar Jul 20 '16 10:07 Huachao

yup, pretty much

mat-mcloughlin avatar Jul 20 '16 10:07 mat-mcloughlin

Same problem here.

bifacil avatar Mar 31 '17 09:03 bifacil

Very relevant: https://github.com/Microsoft/vscode/issues/9527

bifacil avatar Mar 31 '17 10:03 bifacil

I am also facing the same problem. I am running VS Code version 1.36.1 which uses Node.JS version 10.11.0

I use npm to get edge and use build.bat to build "release" against "10.11.0" target. When activating my plugin, my plugin would run require('edge'). When attempting to load the edge module, I also hit the error "not a valid Win32 Application".

JohnZ622 avatar Jul 24 '19 22:07 JohnZ622

any update on this? I'd much rather call my dlls from Edge.js then using stdin/stdout :-|

@mat-mcloughlin: If stdin/stdout is the only viable option, is there a simple tutorial as how to implement this? The code base of OmniSharp is just too big and complext for me to see through :-(

gentledepp avatar Sep 25 '20 13:09 gentledepp