Open vmhazoglou opened 6 years ago
I don't think you can read/write files using the normal methods with UWP apps. I'm having a similar issue right now, in that I can't see how to download files with SSH.NET as it wants to write to a file stream, but UWP doesn't expose any file streams... (as far as I can tell)
Yea, the File.IO namespace isn't available in UWP apps at all. So if this asset uses File.IO then it isn't actually UWP10 compatible. Windows Storage is used instead of File.IO: https://docs.microsoft.com/en-us/windows/uwp/files/quickstart-listing-files-and-folders
Also, shouldn't it target NETFramework to be for UWP apps, not NETCore?
My steps:
Built Renci.SshNet.NET35 and copied the DLL at *\src\Renci.SshNet.NET35\bin\Debug\ into Unity assets
Modified script from here as needed:
Build solution aimed at HoloLens/UWP apps:
SDK - Universal 10
Target device - Any device
UWP Build Type - D3D
Changed .dll settings to SDK: Any SDK ; ScriptingBackend: Dot Net ; Don't process: Checked
Unity version: 5.5.1f1
Visual Studio version: 2015 update 3
Debugger tells me:
An exception of type 'System.IO.FileLoadException' occurred in Renci.SshNet.dll but was not handled in user code
Additional information: Could not load file or assembly 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
I've tried cleaning and rebuilding the solution as well as adding UnityEngine.dll as a reference but with no luck.
Thank you in advance for the help.
Additional info:
I just tried using the DLL from the Renci.SshNet.UAP10 directory and I get the same error.
If I add the lines
It stops throwing the Exception but I have no way to check if it's connected properly because any other code stops working (like trying to write "Connected." in a UI Unity textbox).