StrataFrame Forum

Visual Studio & Remote Desktop

http://forum.strataframe.net/Topic33202.aspx

By Larry Caylor - 11/5/2015

For years I been doing all my development on a big and heavy laptop. While in the office I use a docking station to connect multiple monitors and when working from home I just connect to the office using VPN to get to the database server and team foundation server. Overall it works well except when using the DDT to modify the application database. So I thought I'd give remote desktop a try and use a lightweight ultrabook computer to connect to an office computer with all my development tools. With SF installed on my office computer I'd expect everything to be pretty fast when accessed remotely and over all it is. However I've run into an issue that has me totally stumped. When running an application within Visual Studio via a remote desktop connection I'm getting cross threading errors on some controls. There is no issue if I run a compiled version of the program via remote desktop or if I run the application within Visual Studio locally. The cross threading error is repeatable and only happens when the app is run within Visual Studio remotely using remote desktop. Does anyone have any idea why this might be happening and how to work around it? I've tried googling the error and I get a lots of hits on cross threading errors but nothing specific to Visual Studio and remote desktop.

-Larry
By StrataFrame Team - 11/5/2015

It could have something to do with the way Visual Studio does the vshost.exe model for debugging by default.  Have you gone into your project and configured it to launch the .exe directly?  In the startup project -> Properties -> Debug tab -> Enable Debuggers -> Enable the Visual Studio hosting process.  Turning that off will force VS to launch your .exe and attach to it rather than load your code into the .vshost.exe that's designated for your project.
By Larry Caylor - 11/5/2015

Hi Ben,

Thanks for the suggestion but it didn't make any difference. I have access to Citrix so I'm going to get Citrix remote desktop access set up and see if it has the same issue as Microsoft.

-Larry
By Andrew Harper - 11/5/2015

Hi Larry,

<<The cross threading error is repeatable and only happens when the app is run within Visual Studio remotely using remote desktop. >>

1. Does this mean that you only get the error when running RDP over a VPN? If you RDP on the local network do you get the error? I tried your scenario on my local network using RDP and had no issues with Windows 7 64bit and VS2010. I'm not in a position to test over a VPN at the moment.

2. You could also try Teamviewer as this will allow you connect without a VPN.




Best regards, Andy


By Larry Caylor - 11/6/2015

I had the problem when running the application in debug in VS when using MS Remote Desktop Access over VPN or MS Direct Access. The same thing also happed when using Citrix remote access. Everything worked fine while running the application in debug locally on the PC. Compiled versions of the app also ran fine over RDP and Citrix Remote Access. I'm currently using Windows 8.1 and VS2013.

The cross threading error happened when one of the controls on a form was being disposed. I tried to recreate the issue in a simple SF project but everything worked fine. I ended up deleting the control in the original project, added it back in and wired it up and no more errors while running in debug over RDP. Nothing else was changed. I guess it was just one of those gremlins that creep into VS once in awhile.

The whole point of this exercise was to replace my current Thinkpad T530 which has all of my development tools installed locally with something newer that accesses my development environment remotely. I'm currently testing a Lenovo Yoga 15. It's not much lighter than the T530 but it is definitely cooler. My only issue (aside from the RDP glitch) is the off center keyboard on the Yoga 15 due to the numeric key pad. I can't believe Lenovo did any product testing with actual users before releasing the product because I would think most people would find it very annoying to have their right hand resting comfortably on the palm rest and their left hand hanging off the edge. Other than that, the Yoga 15 is a great machine, especially the display. Lenovo has a 14" Yoga with a standard keyboard but I really want the larger 1020 x 1980 HD touchscreen display since it is the same resolution as the displays we use for digital signage.
By Andrew Harper - 11/8/2015

Hi Larry,

Coincidentally I also use a T530 that I have been really happy with ( long term thinkpad user) and have never had issues with it running hot. I have how ever replaced the C: drive with 256Gb SSD and installed 1Tb HDD in DVD bay.

We are currently in the process of evaluating the Microsoft Surface variations for use at one of our clients. Promising so far,

regards, Andy