How do I test on a Surface Hub - visual-studio

I'm trying to use remote debugging to test an application on a Surface Hub. On my local machine, I'm using VS 2017. Both the local Windows 10 machine and the Surface Hub are running Creator's Update (15063). The Surface Hub and the local machine both have "Developer Mode" enabled.
I've set the authentication to Universal and put the Hub's IP address in as the remote machine name. When I press the Debug button, the Hub puts up a dialog with this:
C:\ProgramData\DeveloperTools\VSRemoteTools\x64\coreclr\CoreCLR.
dll is either not designed to run on Windows or it contains an error. Try
installing the program again using the original installation media or
contact your system adminsitrator or the software vendor for support.
Error status 0xc0000428.
And on my local machine I get this:
DEP0100: Please ensure that target device has
developer mode enabled. Could not obtain a
developer license on 10.10.1.17 due to error
80004005.
Googling around I found that 0xc0000428 is usually a digital signature issue.
I'm aware that I can package up the app and install test certificates and stuff. But I'm hoping there's a way to get VS 2017's debugger to work the way the documentation says it is supposed to.

This is an known bug that got introduced in Visual Studio 15.3 update (CoreCLR did not get signed with certificates required by Surface Hub). It is also tracked here: https://developercommunity.visualstudio.com/content/problem/107166/visual-studio-153-isnt-able-to-remote-deploy-uwp-a.html
It should be fixed in next Visual Studio update.

Related

How to deploy a UWP to a Galaxy TabPro S with windows 10 OS?

I'm trying to deploy a UWP app from my Alienware 18, Laptop with Windows 10, version 1803 to a Tablet Galaxy TabPro S with Windows 10 version 1803 as well.
I had activated developer mode on the device target and the USB device discovery option as well.
First I tried connecting a USB Cable from my laptop to the tablet which has a USB-C port.
But My laptop doesn't even find it.
What I want is to find a way to deploy a UWP from my laptop to the tablet, I made some research and I found out that, only HoloLens and Windows Phone 10, are findable using USB Connection.
So what step should I follow to successfully remote debug my app to a windows 10 Tablet.
I would appreciate details because I tried to follow remote deploying but I haven't been able to successfully find the tablet.
The Windows 10 on your tablet, just like on your development machine, supports remotely debugging over the network rather than over USB. Make sure both machines are in developer mode, with the other machine also having Device Discovery turned on as described here. Both should connect to your WiFi as a private network. After that it should be as simple as configuring your project to deploy to the other machine, rather than locally, as described here and here. Don't forget to pair them with a PIN.
If you host a web API on your development machine, configure your firewall as described here.
Use remote debugging over at https://learn.microsoft.com/en-us/visualstudio/debugger/remote-debugging?view=vs-2017
Make sure you follow the instructions, sometimes remote debugging is barred by firewall so check that.
Alternative right click your main project, go to store then click create packages for sideloading and then send the package over at your Samsung device.
So what step should I follow to successfully remote debug my app to a windows 10 Tablet.
To run a UWP app on a remote machine, you must attach to it using the Remote Tools for Visual Studio.
In some scenarios, the remote tools are automatically installed when you deploy to a remote device. For example,
For Windows 10 PCs running Creators Update and later versions, remote tools will be installed automatically.
Then, your remote device and the Visual Studio computer must be connected over a network or connected directly through a USB or Ethernet cable. Debugging over the internet is not supported.
After that, you need to configure the Visual Studio project for remote debugging. In the properties of the project, select the Debug and choose the Remote Machine from the Target Device list. In general, I will input the remote machine's IP address, you could choose Find to choose the device from the Select Remote Debugger Connection dialog box.
Next step, please move to your Tablet, you need to Set up the remote debugger. You must have administrative permissions on the remote computer. Then, open the Start menu and search for Remote Debugger. If you could find it, just start it normally. If you cannot find it, you need to install it Remote Tools manually. See this link to Download and Install the remote tools. Once the Remote Debugger started, you could do some configurations. After that, you could choose Start Debugging on the Debug menu (Keyboard: F5). The project is recompiled, then deployed to and started on the remote device. Please read Run UWP apps on a remote machine in Visual Studio for more information.

Can Visual Studio remote debugging be done over a local network?

I've been unable to get Visual Studio, running on my development machine, to successfully deploy to a Surface Book on my local network. Error message is included below. On the Surface Book I've installed Remote Tools for Visual Studio, and set up Developer Mode. VS on my development machine shows me the SB, and allows me to select if from a list of deployment targets, including it's Authentication type, but deployment fails.
There is a "pair" option on the SB, which I haven't been able to make work & I'm not sure if it's necessary. In addition, I saw a post saying this option (local network) was no longer supported. Is it still supported, and if so, any idea what I'm doing wrong?
Error Message:
Error DEP6957: Failed to connect to device '10.0.0.179' using Universal Authentication. Please verify the correct remote authentication mode is specified in the project debug settings. COMException - Error HRESULT E_FAIL has been returned from a call to a COM component. [0x80004005]
To remote debug a uwp app, we should install the corresponding version Remote Tools for Visual Studio, before we can deploy the app to the remote device, we should configure the Remote Debugger tool. See the Run UWP apps on a remote machine in Visual Studio for details.
For your this issue, it should be you select the Windows authentication mode in your Visual Studio as the follow image, but you don't have access to the credentials of the signed-in user of the target machine. In your VS, you should use the credentials of the signed-in user of the target machine to deploy your app when the VS popup the permission window. See the Authentication modes to learn the differences.
On the other hand, you can also try to use the None authentication mode to remote deploy your app as the following steps.
Firstly, in the Visual Studio Remote Debugger of the target device, select Tools=> Options to configure the options Window as bellow,
Then in your Visual studio, right click your UWP project=> properties=> Debug to cofigure it as None authentication mode.
The answer from Breeze Liu was very helpful, and got me most of the way to the solution. The final step that I was missing was to add my account to the Remote Debugger's permission list. It's found at Remote Debugger>Tools>Permissions. I had to add my account on the target machine to the list of "permitted" debuggers.

Cannot install my own written kernel driver

I've been working on a kernel-mode driver for Windows 10 using Visual Studio 2015. I can install my driver on VM (which has the exact same version of Windows that I've installed on my host computer) using Visual Studio run and it works just fine. Now I want to install it on the host PC (the primary Windows). First of all, I enabled Test Signing on it. I right clicked on driver inf file and selected Install. It asked if I was sure and I clicked on Yes. After a few seconds a dialog box is shown saying The operation completed successfully. but in fact nothing happens.
It's not being shown in Device Manager on host computer while it is on test computer.
No debug message appears in DebugView related to my driver.
NOTHING is written in setupact.log
I'm using release for x64 configuration. I wonder if there's anything I'm missing in the project config.
I also tried restarting my PC after installation, but it's not working. Can anybody help me?
The solution I found is really odd.
I was using a standard class provided by Microsoft called "SoftwareDevice" and I could install the driver on my Test computer only using Visual Studio Remote Kernel Debugger. However, I had to register and use a custom class and then I could successfully install the driver.

VS2015 debugging on remote machine, Connection always fails

When follow the tutorial Run Windows Store apps on a remote machine,Visual Studio 2015 can't connect to the remote debugging tools.
VS2015 finds the remote machine, and it can be selected. However when you will try to run the application on the remote machine, the Remote debugger will simply say "Connection from XXX failed".
Neither it, nor visual studio provide any clue as to what happened.
This happens because the tutorial links an old version of remote debugger.Current version can be found at their Download Center.
Up to date guide:
Deploying and debugging Universal Windows Platform (UWP) apps.
It seems to be Microsoft's custom to have multiple, mutually contradictiong versions of the same documentation.

KMDF driver building using VisualDDK and Visual studio 2008

To build my driver i used VisualDDK in visual studio 2008. In the beginning i start debugging using my computer and virtualBox machine but when i launch the debugging process in visual studio, my virtual machine did not show me the external ip address(normally should show me 192.168.1.102 and 10.0.1.15 in DDKLauncherMonitor but it show me only 10.0.1.15 ).
I stopped using virtual machine and i decide to use real computer. In the second computer i launched DDKLauncherMonitor. And i start debugging from my first computer. I received Udp package in my second machine and also the driver.sys. But when i tried to load the driver from visual studio(First computer) nothing work. Plus this, in the second machine tell me "Windows required digitally signed driver".
There is same one meet this kind of problem and he/she can help.
Can you go into more details when you say "nothing works"? It's possible that your debugger is not set up properly.
This is kind of a pseudo-answer since I'm not overly aware of VisualDDK, but have you considered trying the standard Microsoft debugging tools like WinDbg? If you can acquire Visual Studio 2012 or 2013 Preview, all of the build and debug tools are integrated into the IDE and you will get full support from Microsoft with any problems you may encounter.
As for your second issue, it sounds like you're building a driver and not signing it. Is your target PC 64-bit? What operating system is it? The 64-bit Windows platform requires signed drivers for installation, but this can be disabled.
You can disable the driver signing requirement using the F8 menu when booting your PC; this should fix your "digitally signed driver required" problem, but needs to be done for each reboot.
Another option would be to add a post-build step or some sort of scripted execution of the Microsoft signing tools (Inf2cat, SignTool) to sign your driver with your company's certificate.

Resources