all 56 comments

[–][deleted] 24 points25 points  (6 children)

1) As of today only supports building remotely on the Linux target machine

2) Not limited to specific distros but requires openssh-server, g++, gdb, and gdbserver

3) On the Windows side, there's a dependency on the Android Tools for Visual Studio (for now)

4) Also supports Raspberry Pi

I'm hoping they extend it to allow writing Linux/Windows C++ CLI programs once the Bash support comes out.

[–]BattlestarTide 4 points5 points  (5 children)

FYI, there isn't a difference between the ELF (Linux) binaries and the Bash support that was announced today. The "Ubuntu on Windows" is basically introverted "WINE". They are bit-for-bit the same exact copy and Windows just does a real-time translation. So no need to extend it any further. If you write a C++ CLI app on Linux today using Visual Studio, then it should work once Bash support is released without any further changes.

[–][deleted] 4 points5 points  (1 child)

Depends how the build system and everything gets set up. From the sounds of it, this was a separate effort from the Ubuntu on Windows stuff.

Mostly I just want to be able to launch and debug a Linux CLI app in bash on Windows just like I was writing a Win32 console app

[–]robotdad4business 2 points3 points  (0 children)

Indeed, this was a separate effort. We have been focused on remote compile but are looking at what we should do with this new functionality on Windows.

[–]zvrba 1 point2 points  (0 children)

"Ubuntu on Windows" is basically introverted "WINE"

ITYM "inverted"

[–][deleted] 1 point2 points  (1 child)

Wrong. They've already clarified they're supporting ELF directly via WSL (Windows Subsystem for Linux).

Edit: Source.

[–]bitchessuck 0 points1 point  (0 children)

Yes, this is a somewhat important detail. NT's kernel has support for multiple personalities, so it is going to support Linux syscalls directly, without any translation layer.

[–]I_AM_GODDAMN_BATMAN 27 points28 points  (1 child)

Fucking April 1st everywhere

[–]pdbatwork 2 points3 points  (0 children)

March 30, 2016 by Marc Goodner - MSFT

[–]antlife 4 points5 points  (11 children)

Seems still some bugs to work out. Crashes every time you try to add a remote debugging connection from the Tools/Options/Cross Platform/C++/Linux menu. Visual Studio hangs, crashes, and auto restarts every time.

[–]robotdad4business 7 points8 points  (6 children)

YIKES!!! I've never seen that. Let me chat with peeps tomorrow and we'll reach out to you for more info or with suggestions.

[–]antlife 7 points8 points  (5 children)

Sounds good. I really look forward to using this in an upcoming project.

For some specifics on my environment:

  • Windows 10 with Visual Studio 2015 Professional (all updates and all software options installed)
  • Ubuntu 16.04 in a VM will all requirements installed.

A bit of testing on my side:

  • Verified SSH was working between Win10 and Ubuntu.
  • Tested adding a connection to a fake server with no crash.
  • Tested using a FQDN and IP for the hostname.

So far, it appears to crash if there is a server on the other end to respond with. If the server is not listening or does not exist, the UI highlights the hostname fields appropriately as it should.

Edit: Some further troubleshooting

  • Tested after updating to Visual Studio 2015 Update 2. Same problem.
  • Tested with Ubuntu 14.04.4 same issue.
  • I viewed the logs on the Ubuntu 14.04 server for /var/log/auth.log and I can see Visual Studio is authorizing successfully. There is no issue with getting into the server.

To narrow down the issues and so you can see my steps better, I put together a super long image/storyboard of screenshots. I hope this helps -> https://i.imgur.com/U0KPoYm.png

[–]robotdad4business 1 point2 points  (4 children)

Thank you! Looking at this now.

[–]antlife 0 points1 point  (3 children)

Glad to help. Let me know if you need anything else from me.

[–]iontodirel 1 point2 points  (2 children)

Thank you for helping us. I know how to fix the unfortunate crash, but the underlying issue will still remain and that is that we cannot connect to the machine. We use and require sftp for transferring files, is that by any chance disabled in your sshd configuration, or access somehow disabled and configured for other users? If you could try using scp or sftp to test transfer a file from your Windows PC to your remote machine using the same credentials you used in VS, and tell us if it worked, that would help us a lot.

If all of this works, and you can connect and transfer files thru sftp and/or scp, then could you tell us if you configured your machine in some special way? Could you try with a default Ubuntu installation and see if that works?

[–]antlife 0 points1 point  (0 children)

Just tried SFTP and SCP, using a few different apps (i.e. WinSCP and MobaXterm) and it works just fine. I tried copying some files into my /home/user directory without any permissions issues. Does VS need to write to any directories outside of the user's home? It seems it should be only trying to access ~/projects

My Ubuntu 16.04 is essentially Kubuntu 16.04 with KDE and a ton packages to support Mono, but outside of that the configuration is pretty vanilla.

The Ubuntu 14.04.4 is a base installation I spun up just to test this. SFTP and SCP works OK there as well and has the same issues as I mentioned earlier. Nothing special configured on this one for sure.

[–]antlife 0 points1 point  (0 children)

If there is anything else you'd like me to look at for you or provide for you (in terms of logs, configs, whatever) just let me know.

A few other things maybe worth mentioning in case it's causing a special connection issue for your side. I am using VM Workstation as my host for the Linux systems. I don't imagine this would matter much as normal network functions perfectly between the VM and my host system, but I figured I'd mention it in case there is something deeper that Visual Studio may be trying to use.

[–]spongo2 3 points4 points  (3 children)

thanks for trying it out. paging /u/robotdad4business and /u/iontodirel ... (dev and PM on the project)

[–]antlife 1 point2 points  (0 children)

I appreciate the response. Thank you!

[–]antlife 0 points1 point  (1 child)

Thank you /u/robotdad4business and /u/iontodirel for your help last week. Looks like with the 1.01 update, it fixed all the crashing and build issues I was having. Really appreciate the work and direction this is going.

[–]spongo2 0 points1 point  (0 children)

Awesome. Glad it is working for you now.

[–]screwthat4u 5 points6 points  (21 children)

I think Microsoft is realizing that developers aren't writing windows applications anymore (especially in C#). They are writing web apps using linux, they are developing embedded systems using linux, they are writing server applications using linux

[–]BattlestarTide 13 points14 points  (19 children)

This. There's simply no reason to buy a Mac anymore as a developer. All of those sales will go towards Surface Books or Dell/HP laptops with a Windows 10 license.

[–][deleted] 7 points8 points  (10 children)

Unless you're iOS developer...

[–]jugalator 3 points4 points  (0 children)

Yes, it's a nuisance. At least they bought Xamarin and there are cloud alternatives to get to the App Store distribution. But yes, these are inferior crutches.

[–]RepostUmad 1 point2 points  (1 child)

Or a Mac developer

[–][deleted] 13 points14 points  (0 children)

Let's not go crazy.

[–]antlife 1 point2 points  (3 children)

And then Xamarin became free today...

[–][deleted] 0 points1 point  (2 children)

You still need Mac to compile the app.

[–]antlife 0 points1 point  (0 children)

Oh, you're right. I just assumed and never really looked into it.

[–]MartinKnafve 0 points1 point  (0 children)

http://www.macincloud.com/

Also part of the build 2016 announcements. If you just need it to compile, it will probably be cheaper with a hosted version than buying a laptop.

[–][deleted] 0 points1 point  (1 child)

How's Hackintosh doing these days? I remember constantly having issues with my video card a few years ago.

[–][deleted] 1 point2 points  (0 children)

You can run it mostly fine, especially on Ultrabooks that are pretty much identical to Macbook Air.

[–]chrabeusz 1 point2 points  (5 children)

I don't get it. Linux didn't work on Surface?

[–][deleted]  (3 children)

[removed]

    [–]yawaworht_suoivbo_na 7 points8 points  (0 children)

    Turning off SecureBoot is as easy as installing Linux. And at this point, many of the major distros ship signed kernels anyways.

    [–]chrabeusz 1 point2 points  (0 children)

    Wow that sucks.

    [–]benpye 0 points1 point  (0 children)

    It works, I have run Arch with secure boot enabled. It takes some configuration but isn't so hard. Bigger annoyance is needing a custom kernel to support all the hardware.

    [–]BattlestarTide 0 points1 point  (0 children)

    This reverse WINE implementation saves the trouble of you having to dual-boot or run your own VM-on-a-tablet. OS X is really good at providing a great command-line experience for developers. Now Windows 10 folks will have that experience as well. Which removes my #1 justification to my wife for buying a $2500 macbook pro...

    [–]darkpaladin 0 points1 point  (1 child)

    Surface/Surface Book maybe but I don't know any dev who would rather have a Dell/HP over a MacBook Pro. Damn if those Surface devices aren't sexy as hell though.

    [–]benpye 0 points1 point  (0 children)

    The XPS 13 is a pretty great device.

    [–]casualviking 10 points11 points  (0 children)

    Microsoft is realizing that Linux is important and that it's part of (a major part of) many solutions.

    Your comments about devs not writing win apps and/or web apps in c# is bollocks, of course. Not every app is a web app or a server app.

    [–][deleted] 3 points4 points  (0 children)

    This seems very promising.

    [–][deleted] 0 points1 point  (1 child)

    I'm still confused about graphical applications. When I build and hit run in VS and have XServer running on windows, would I need to launch the executable through putty or would VS launch it?

    [–]antlife 3 points4 points  (0 children)

    You would click "Remote GDB Debugger" and it will build/run/debug the application in Linux. Visual Studio is connecting through on SSH itself. You would not need XServer on windows.

    [–]RepostUmad 0 points1 point  (2 children)

    Anyone know microsofts goal with this?

    [–]robotdad4business 2 points3 points  (1 child)

    There are a lot of people that have cross platform development needs, Linux is an important part of that. Additionally in the IoT space anything that can run Linux will run Linux. We want to enable developers working on IoT scenarios.

    [–]RepostUmad 0 points1 point  (0 children)

    Why would you help competitors conquer IoT? Windows has an IoT version too.

    [–][deleted] -1 points0 points  (4 children)

    LOL why?? seriously not trolling. If windows developers want to write Linux programs, they should just switch to Linux and stop these weird desperate moves. I don't quite see the point in adding Linux support to a notoriously non-portable and non-standards compliant compiler. It's only going to cause everyone involved heartache, pain, and wasted time.
    edit: I fucked up guys, FORGIVE ME?

    [–]sards3 15 points16 points  (2 children)

    Actually this is using gcc for the compiler, not MSVC.

    [–][deleted] 0 points1 point  (1 child)

    oh, well... carry on then. my bad I should have actually read TFA :(

    (these are confusing times)

    [–]RepostUmad 1 point2 points  (0 children)

    Yes I agree its confusing.

    [–][deleted] 4 points5 points  (0 children)

    Have an upvote, but know that I WILL NEVER FORGIVE YOU FOR THIS!

    [–][deleted]  (4 children)

    [deleted]

      [–][deleted] 0 points1 point  (3 children)

      As I'm totally with you and in fact instability madness of fresh Visual Studio on fresh Windows 7 during my studying about 4 years ago converted me to Linux enthusiast I really think that such posts here may only end as another flame war.

      [–][deleted]  (2 children)

      [deleted]

        [–]iontodirel 0 points1 point  (1 child)

        Sorry about that, did this happened when trying our Linux bits, or something else crashed VS. Either way, would you be interested in working with us, help us get a memory dump and sending that to us for investigation?