Jump to content

Visual Studio on Linux

FaiL___

Just some preface before I get comments about VS Code etc, I do know about VS Code and do in fact have both VS and VS Code installed on my WinPC (I use standard VS for C++ and the majority of my uni work (CompSci) as we have to submit the solution files (.sln) and use VS Code for more of my recreational projects such as just playing around with Python/Java/Web Design). I also know that there is no official support for VS on Linux, I've spent the summer with Linux on my laptop as I haven't been at uni, but have just re-installed windows as the term start is approaching next week. Basically, is there any 3rd party way of getting VS to run smoothly on Linux, not talking about virtual machines, for example using programs like Wine (which I have researched and apparently doesn't work). I know that with the release of Steam Proton, that removes one of the barriers I have in order to switch over to a Linux-only life. I can now run all my steam games in my 230+ library on Linux, all I need is to be able to code for my degree, and I'm outta windows.

 

That was a long read, but thanks if you did. If I reply to a comment, I'll quote, please do the same. Cheers in advance.

There are 10 types of people in the world. Those that understand binary and those that don't.

Link to comment
Share on other sites

Link to post
Share on other sites

My understanding is it's actually possible to install and run VS with Wine and coding is possible. The issues start when you try to compile anything, the compiler doesn't work under Linux (which makes sense as it's trying to call Windows libraries to compile against).

 

Have you actually tried it?

Main Rig:-

Ryzen 7 3800X | Asus ROG Strix X570-F Gaming | 16GB Team Group Dark Pro 3600Mhz | Corsair MP600 1TB PCIe Gen 4 | Sapphire 5700 XT Pulse | Corsair H115i Platinum | WD Black 1TB | WD Green 4TB | EVGA SuperNOVA G3 650W | Asus TUF GT501 | Samsung C27HG70 1440p 144hz HDR FreeSync 2 | Ubuntu 20.04.2 LTS |

 

Server:-

Intel NUC running Server 2019 + Synology DSM218+ with 2 x 4TB Toshiba NAS Ready HDDs (RAID0)

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Master Disaster said:

My understanding is it's actually possible to install and run VS with Wine and coding is possible. The issues start when you try to compile anything, the compiler doesn't work under Linux (which makes sense as it's trying to call Windows libraries to compile against).

 

Have you actually tried it?

I did try it a while ago, but it was on a small, poorly supported distro, and was running on my very tired laptop which didn't have the best specs. Was wondering if that might have been the problem, but it does make sense that the compiler would be what goes wrong.

There are 10 types of people in the world. Those that understand binary and those that don't.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, wasab said:

If you are developing for Windows, you need to get Windows. :/

 

 

I'm not necessarily developing for windows, some of our code we have to make sure runs on Linux as we sometimes have automatic marking servers which run linux, so we are taught to use the less secure versions of functions (such as scanf as opposed to the windows-only sscanf).

There are 10 types of people in the world. Those that understand binary and those that don't.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, FaiL___ said:

I'm not necessarily developing for windows, some of our code we have to make sure runs on Linux as we sometimes have automatic marking servers which run linux, so we are taught to use the less secure versions of functions (such as scanf as opposed to the windows-only sscanf).

In that case why would you need to use visual studio? 

Sudo make me a sandwich 

Link to comment
Share on other sites

Link to post
Share on other sites

39 minutes ago, wasab said:

In that case why would you need to use visual studio? 

As I said, we have to upload the .sln files which VS Code doesn't create, the actual code we're writing could be run on Linux, but the file we have to upload has to be that .sln.

There are 10 types of people in the world. Those that understand binary and those that don't.

Link to comment
Share on other sites

Link to post
Share on other sites

Why not use CMake?

It can generate *.sln files, Makefiles, ninja files and more.

Its the defacto standard build system for cross platform C++ development.

 

Also, scanf is not really C++, just a leftover from C (proper C++ would be to use an input stream).

Desktop: Intel i9-10850K (R9 3900X died 😢 )| MSI Z490 Tomahawk | RTX 2080 (borrowed from work) - MSI GTX 1080 | 64GB 3600MHz CL16 memory | Corsair H100i (NF-F12 fans) | Samsung 970 EVO 512GB | Intel 665p 2TB | Samsung 830 256GB| 3TB HDD | Corsair 450D | Corsair RM550x | MG279Q

Laptop: Surface Pro 7 (i5, 16GB RAM, 256GB SSD)

Console: PlayStation 4 Pro

Link to comment
Share on other sites

Link to post
Share on other sites

18 hours ago, mathijs727 said:

Why not use CMake?

It can generate *.sln files, Makefiles, ninja files and more.

Its the defacto standard build system for cross platform C++ development.

 

Also, scanf is not really C++, just a leftover from C (proper C++ would be to use an input stream).

Yeah, sorry, in some of our modules we use c, others we use c++ so we just use scanf for both as it's just less confusing, it's basically like writing the same language, but we have different uses for them

There are 10 types of people in the world. Those that understand binary and those that don't.

Link to comment
Share on other sites

Link to post
Share on other sites

On 06/09/2018 at 9:43 PM, FaiL___ said:

I did try it a while ago, but it was on a small, poorly supported distro, and was running on my very tired laptop which didn't have the best specs. Was wondering if that might have been the problem, but it does make sense that the compiler would be what goes wrong.

 

On 06/09/2018 at 9:40 PM, Master Disaster said:

My understanding is it's actually possible to install and run VS with Wine and coding is possible. The issues start when you try to compile anything, the compiler doesn't work under Linux (which makes sense as it's trying to call Windows libraries to compile against).

 

Have you actually tried it?

 The last time I tried to run VS on Wine failed very miserably.

 

I tried to install VS 2017 on Wine and the installer for VS kept crashing under wine.

Judge a product on its own merits AND the company that made it.

How to setup MSI Afterburner OSD | How to make your AMD Radeon GPU more efficient with Radeon Chill | (Probably) Why LMG Merch shipping to the EU is expensive

Oneplus 6 (Early 2023 to present) | HP Envy 15" x360 R7 5700U (Mid 2021 to present) | Steam Deck (Late 2022 to present)

 

Mid 2023 AlTech Desktop Refresh - AMD R7 5800X (Mid 2023), XFX Radeon RX 6700XT MBA (Mid 2021), MSI X370 Gaming Pro Carbon (Early 2018), 32GB DDR4-3200 (16GB x2) (Mid 2022

Noctua NH-D15 (Early 2021), Corsair MP510 1.92TB NVMe SSD (Mid 2020), beQuiet Pure Wings 2 140mm x2 & 120mm x1 (Mid 2023),

Link to comment
Share on other sites

Link to post
Share on other sites

17 hours ago, AluminiumTech said:

 

 The last time I tried to run VS on Wine failed very miserably.

 

I tried to install VS 2017 on Wine and the installer for VS kept crashing under wine.

Also i ran over 2 years Visual Studio over VM while using Ubuntu and there is some case where you get error when debugging in VM vs Real computer. I don't know why but we were 4 teams of 6 people with that setup and we all add issue under VM. We switch to a dual boot and gone some of the strangest exception.

Link to comment
Share on other sites

Link to post
Share on other sites

Just install windows 10 in a usb device large enough to hold the os and visual studio, or use a virtual machine. Windows 10 has the ability to run linux software through bash, and while it officially only supports command line tasks, with some workarounds you can run many gui programs as well (didn't test that last part, just read about it). It can run linux syscalls correctly too (tested).

On Visual Studio on windows you can compile for linux and through bash directly run the software you just compiled.

Link to comment
Share on other sites

Link to post
Share on other sites

On 9/6/2018 at 3:43 PM, wasab said:

If you are developing for Windows, you need to get Windows. :/

 

 

Or, run windows in a VM, Virtualbox has a seamless desktop mode I believe

 

My procrastination is the bane of my existence.

I make games and stuff in my spare time.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Windows 10 can run without being activated right away so perhaps you could dual boot and save your files to a USB drive? 

 

Most of my later college work was saved to a 64 GB USB drive that could be accessed by the big 3 OS. 

Link to comment
Share on other sites

Link to post
Share on other sites

On 9/10/2018 at 7:52 PM, SilicateWielder said:

Or, run windows in a VM, Virtualbox has a seamless desktop mode I believe

 

For having worked with Ubuntu and trying Wine i agree to this. Virtual Box or VMWare on a server running a windows image works great. There is couple cases where it doesn't compile or throw fake errors when running. This happen to us when developing c# with asp.net and desktop projects (WPF/Winforms). I don't know if it can happen with c++ we never had a project in c++ when i worked there. We resorted on building 1 real computer with windows installed to compile those problematic projects.

Link to comment
Share on other sites

Link to post
Share on other sites

  • 4 weeks later...

@FaiL___  You absolutely can add solution files in VS Code to your project folder just run the command 'dotnet new sln'.

You then add the .csproj files to you sln by running the command 'dotnet sln mySln.sln add myApp/mycsProj.csproj' for each project.

See documentation here https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-sln

 

EDIT: realised you're dealing with C++ so not relevant!

Link to comment
Share on other sites

Link to post
Share on other sites

On 9/10/2018 at 7:52 PM, SilicateWielder said:

Or, run windows in a VM, Virtualbox has a seamless desktop mode I believe

 

There is a seamless mode. I have seen it on one of my buddy setup. I personally have 2 monitors so i have it full screen on a second monitor.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×