Closed sgithens closed 1 month ago
You are getting the error because your syntax is a little wrong. You need a class definition if you have a using statement, see sample 208_convertImage.js for an example.
However there's a more fundamental problem, which is that you are trying to reference a WinRT dll. Edge builds a regular C# class library and then calls the code in it. As I'm sure you know, you can't directly reference a WinRT dll from a regular C# class library. There were some workarounds for this in Win8.1. However I think in Win10 the Edge C# compiler needs changing for Edge to be able to use the WinRT APIs (although I'm far from an expert in the UWP). Have a look at edge-cs.sln.
Hi Rich,
Thanks for the quick response. I'll take a look at the syntax error/example to fix that.
For the WinRT dll, I didn't actually know that. Actually, I'm just in the progress of porting this code from a small C# app that was running on Windows 8 to my node app running on Windows 10. (ie. I'm not a real .NET developer, just doing enough to use some builtin NFC hardware and other things! :) )
Will take a look at that suggestion and report back.
Hi,
I'm using edge on a Windows 10 box with Node 4.3.1. I've tried this with both the 32-bit and 64-bit versions of Node.
For some reason, I can't seem to include the Window.Networking.Proximity assemblies. On both versions of Node I've also tried including the Windows.Networking.Proximity.dll from both Windows/System32 and Windows/SysWOW64. Each time I get the same error. Any suggestions would be greatly appreciated.
Thanks much! Steve
test.js
testlistener.cs
output