819

Microsoft recently released Visual Studio Code and I am a little confused about its usage, since Visual Studio has lot of functional similarities with it.

aheze
  • 24,434
  • 8
  • 68
  • 125
Aswajith
  • 9,117
  • 5
  • 16
  • 20
  • 34
    Do we miss out on anything by switching from Visual Studio to VS Code? – Gerard Simpson Sep 22 '17 at 05:31
  • 26
    IMHO, if you are working in Windows environment, you should stop wasting your time on VS Code. This is another thing which is HOT nowadays for nerds and multi-platform users. It is not even close to Visual Studio. – FLICKER Dec 27 '17 at 21:47
  • 2
    Relevant blog post https://blogs.msdn.microsoft.com/wael-kdouh/2017/09/05/should-i-use-visual-studio-2017-or-vs-code-for-my-next-angular-application/ – Michael Freidgeim May 23 '18 at 11:42
  • Update to Jenny's post: The Community editions actually started since VS 2013. (2013 is great free platform for producing get-in-and-out-quick project releases, as unlike 2015 it's stable itself.) Express editions still exist even in 2015, but "express" editions are now aimed as light platforms for individual targets (i.e. choose one of Web or Desktop or W10) rather than the Express 2008/2010 single language (i.e. choose one of c++, c#, vb ...) style. Even then the official Express download site suggests people really should consider Community - why wouldn't you? – Rob Oct 29 '16 at 04:08
  • 2
    IMHO, on any platform, you should stop wasting your time on Visual Studio. VS Code is the step in the right direction. VS is totally overloaded, yet I have to install an extension to get a vertical line in my code editor. Bad enough that I need to use the terrible MSVC compiler with VS Code, because so many people don't care about platform independence, which is why Microsoft still has so much power. (Btw. I'm on Windows 10, developing in C++ with VS Code and CMake) – Neonit Sep 09 '22 at 14:00
  • 1) I can't believe it's already been more than seven years since VS Code came out. 2) A an easier question to answer might be "What do they have in common?" 3) Despite a few attempts, I've never been able to get into VS Code. People call VS slow, but the human slowness I encounter trying to use VS Code is many orders of magnitudes worse than the few extra milliseconds VS might take to do this or that. I'll open a VS instance sometimes just to use its Git plugin to manage a repo which has no VS-related content, simply because it's better than every Git extension I've tried in VS Code. – bubbleking Sep 26 '22 at 21:04

14 Answers14

484

Visual Studio (full version) is a "full-featured" and "convenient" development environment.

Visual Studio (free "Express" versions - only until 2017) are feature-centered and simplified versions of the full version. Feature-centered meaning that there are different versions (Visual Studio Web Developer, Visual Studio C#, etc.) depending on your goal.

Visual Studio (free Community edition - since 2015) is a simplified version of the full version and replaces the separated express editions used before 2015.

Visual Studio Code (VSCode) is a cross-platform (Linux, Mac OS, Windows) editor that can be extended with plugins to your needs.

For example, if you want to create an ASP.NET application using Visual Studio Code you need to perform several steps on your own to setup the project. There is a separate tutorial for each OS.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Krisztián Balla
  • 19,223
  • 13
  • 68
  • 84
  • 5
    @RBT, License-wise, Express was permitted to be used commercially and in enterprise, Community is NOT. VS Code should become THE new VS Express, only if somebody does implement the missing functionality – Петър Петров Jan 12 '18 at 21:52
  • 9
    Other than licensing, Visual Studio Community is *almost* identical to Visual Studio Professional. – Brian Apr 19 '18 at 20:40
  • 9
    @ПетърПетров That's not accurate. According to the license terms https://www.visualstudio.com/license-terms/mlt553321/ you can use it commercially if you are an individual or a small company. – Mo Sanei May 31 '18 at 23:45
  • 3
    "...and can be [run in the browser](https://github.com/cdr/code-server) (dockerized as client-server architecture), making VS Code a "cloud-native" IDE, with ambitions to [replace Jupyter for python users](https://github.com/microsoft/vscode-python/blob/master/README.md)" – mirekphd Nov 21 '19 at 06:06
  • 2
    NB: Generally speaking, Visual Community Edition cannot be used by large companies for commercial projects: https://visualstudio.microsoft.com/license-terms/mlt031819 – richardsun Nov 30 '21 at 15:58
  • So essentially VS Code is Emacs? /me ducks – Justin Goldberg Jul 16 '23 at 13:52
277

Visual Studio Code is an editor while Visual Studio is an IDE.

Visual Studio Code is cross-platform and fast, while Visual Studio is not fast.

Note that Visual Studio for Mac is available now but is a different product compared to Visual Studio (Windows). It's based on Xamarin Studio and lacks support for some older .NET project types. It does successfully build solutions created in Visual Studio 2017. Visual Studio for Mac has a more limited UI (for example, no customizable toolbar). So for cross-platform work, Visual Studio Code may still be preferable.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
John Papa
  • 21,880
  • 4
  • 61
  • 60
  • 34
    If I ignore platform independence for a second do we have any other use case which can motivate me to use VS Code? If I'm a windows only developer I would obviously prefer free community edition (which is a full IDE). Isn't it? – RBT Oct 23 '16 at 04:51
  • 11
    You might find a better set of extensions available for Code than for Community. They support different extensibility points, so their extension sets are mutually exclusive. If you use more esoteric (less Microsoft-y) workflows, you might find the Code extension marketplace more suitable. – Jonathan Lidbeck Jun 26 '17 at 05:36
  • 37
    @johnpapa, which definition do you give of "IDE"? Since VS Code allows debugging, I can't see it as just an Editor. – Massimiliano Kraus Mar 03 '18 at 14:01
  • 7
    @MassimilianoKraus Good question. Other editors also debugging (atom, for example). I think of editors as having a primary focus of writing code/text. I think if IDE's as a do-it-all with a lot of built in extras (e.g. buttons for everything). IntelliJ and VS are IDE's, IMO. Atom, vi, VS Code, Sublime are editors, IMO. Maybe there is a better explanation on the web somewhere :) – John Papa Mar 19 '18 at 13:32
  • 1
    With VS Code you have to set up a lot of things by hand. With VS much is automated by the IDE and project templates etc. – ed22 Feb 07 '20 at 11:13
  • 16
    VS Code is not a text editor. Notepad is a text editor. VS Code can compile, run, debug, and do code completion, therefore it's an IDE as it integrates all the things necessary for development – dan carter Jul 29 '20 at 23:54
  • 2
    yes, vs code is faster, but what a regression (IMHO) compared to VS2019 ! maybe I miss something and/or vs code ease of use has been dramatically improved. There are (were?) some many things to do manually. Of course VS Code is cross-platform, and that's an important point. In my case, I don't currently need to compile for Linux or other platforms, so I'll stick to VS2019 (and I'm very happy with that) – ggo May 06 '21 at 12:14
217

I will provide a detailed differences between Visual Studio and Visual Studio Code below.

If you really look at it the most obvious difference is that .NET has been split into two:

  • .NET Core (Mac, Linux, and Windows)
  • .NET Framework (Windows only)

All native user interface technologies (Windows Presentation Foundation, Windows Forms, etc.) are part of the framework, not the core.

The "Visual" in Visual Studio (from Visual Basic) was largely synonymous with visual UI (drag & drop WYSIWYG) design, so in that sense, Visual Studio Code is Visual Studio without the Visual!

The second most obvious difference is that Visual Studio tends to be oriented around projects & solutions.

Visual Studio Code:

  • It's a lightweight source code editor which can be used to view, edit, run, and debug source code for applications.
  • Simply it is Visual Studio without the Visual UI, majorly a superman’s text-editor.
  • It is mainly oriented around files, not projects.
  • It does not have any scaffolding support.
  • It is a competitor of Sublime Text or Atom on Electron.
  • It is based on the Electron framework, which is used to build cross platform desktop application using web technologies.
  • It does not have support for Microsoft's version control system; Team Foundation Server.
  • It has limited IntelliSense for Microsoft file types and similar features.
  • It is mainly used by developers on a Mac who deal with client-side technologies (HTML, JavaScript, and CSS).

Visual Studio:

  • As the name indicates, it is an IDE, and it contains all the features required for project development. Like code auto completion, debugger, database integration, server setup, configurations, and so on.
  • It is a complete solution mostly used by and for .NET related developers. It includes everything from source control to bug tracker to deployment tools, etc. It has everything required to develop.
  • It is widely used on .NET related projects (though you can use it for other things). The community version is free, but if you want to make most of it then it is not free.
  • Visual Studio is aimed to be the world’s best IDE (integrated development environment), which provide full stack develop toolsets, including a powerful code completion component called IntelliSense, a debugger which can debug both source code and machine code, everything about ASP.NET development, and something about SQL development.

  • In the latest version of Visual Studio, you can develop cross-platform application without leaving the IDE. And Visual Studio takes more than 8 GB disk space (according to the components you select).

  • In brief, Visual Studio is an ultimate development environment, and it’s quite heavy.

Reference: https://www.quora.com/What-is-the-difference-between-Visual-Studio-and-Visual-Studio-Code

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Sajeetharan
  • 216,225
  • 63
  • 350
  • 396
  • 1
    may be the statement "_VS Code is Visual Studio without the Visual!_" should have been "_VS Code is code editor like Visual Studio without the Visual!_" – user1451111 Jun 27 '18 at 10:47
  • 29
    Do you have any evidence of this assertment? - _It is mainly used by developers on a Mac who deal with client-side technologies (HTML/JS/CSS)._ – Ernesto Allely Oct 10 '18 at 08:26
  • 4
    Can you ellaborate on "Community version is free but if you want to make most of it then it is not free"? Cause as far as I know, the feature set in Community edition is similar to the Pro edition, so you _should_ be able to "make the most of it", right? – Yin Cognyto Oct 15 '18 at 21:41
  • 1
    @YinCognyto - Yes, Community is quite capable of handling substantial development, including multiple projects and deploying to a variety of target platforms. Unless you need the high-end design/team tools that are only in Enterprise (or work in a company that meets MS criteria for being an Enterprise), you can do everything you need in Community. Unless you are targetting mobile via Xamarin: the Xamarin Profiler requires Enterprise license, so you'll have to pay, or do without. – ToolmakerSteve Nov 27 '18 at 13:30
  • @ToolmakerSteve I want to develop for desktop (and mobile if needed), but tools like Profiler (and others) are bloatware for me (I can avoid memory leaks through proper coding and identify them at runtime), so I can live without it. VS is huge enough as it is (40+ GB only the package) - it would have been nice if there was a guide to point out the things you can skip from installing without affecting critical tasks, targeted platforms or dependencies. So far I went with the (sadly, dead) SharpDevelop and Android Studio - hopefully it will be enough for my needs - correct me if I'm wrong. – Yin Cognyto Nov 27 '18 at 23:24
  • @YinCognyto - If your goal is to program in C# (you mention SharpDevelop), and run on Android, I can't imagine that its worth your time to program in anything less than Xamarin.Android. How exactly do SharpDevelop and Android Studio work together? I recommend installing VS Community, selecting ONLY "for mobile development" (I forget the exact wording) - that should give you Xamarin and all its dependencies, without anything else. – ToolmakerSteve Nov 28 '18 at 13:24
  • @YinCognyto - An alternative is to use [Unity 3D](https://unity3d.com/), which is a quite different way to use C# and target Android and other platforms. IIRC, that is now an option when installing VS Community. While I have not used Unity, it has a large community, and a different set of strengths than Xamarin. Important benefit: you can make browser-based apps with it, that run via WebGL. Many game-oriented features and libraries available. – ToolmakerSteve Nov 28 '18 at 13:31
  • 2
    While "All native user interface technologies (Windows Presentation Foundation, Windows Forms, etc) are part of the framework, not the core." was true in the time of the answer, it will not be soon, see Core 3. – g.pickardou Jan 18 '19 at 06:28
  • @YinCognyto - Generally speaking, Visual Community Edition cannot be used by large companies for commercial projects: https://visualstudio.microsoft.com/license-terms/mlt031819/ – richardsun Nov 30 '21 at 15:56
  • @richardsun Yes, I was aware of that, but thanks anyway for making it clear. I was talking more in terms of features and / or practical usability than in terms of who can use it, but in the meantime, ToolmakerSteve's comments clarified those aspects pretty well. – Yin Cognyto Dec 01 '21 at 16:25
  • The Enterprise features that aren't in Community (and aren't in VS Code, either) wouldn't be missed by a solo developer, like: more than 5 licenses, and unit coverage wizards. For purposes of this question, ignore Enterprise. See https://visualstudio.microsoft.com/vs/compare/ for full comparison of Community, Professional and Enterprise. – woodvi Dec 10 '21 at 19:29
68

Visual Studio

  • IDE
  • Except for free editions, it is a paid IDE.
  • It is quite heavy on CPU and lags on lower end PCs.
  • It is mostly used for Windows software development including DirectX programs, Windows API, etc.
  • Advanced IntelliSense (best one ever; Visual Studio Code's IntelliSense extension takes second place)
  • It features built-in debuggers, easy-to-configure project settings (though developers tend to not use the GUI ones)
  • Microsoft support (more than Visual Studio Code)
  • Mostly used for C/C++ (Windows), .NET and C# projects along with SQL Server, database, etc.
  • Extreme large download size, space utilization and the slow downs over time.
    • It is the only con that forces me to use Visual Studio Code for smaller projects*
  • Includes tools to generate dependency graphs. Refactoring tools have great support for Visual Studio.
  • Has a VYSIWYG editor for VB.NET, C++.NET, and C#. (It is easy enough for first time users instead of getting through windows.h)

Visual Studio Code

  • Free open source text editor
  • Has IntelliSense (but it doesn't work out of box if Visual Studio is not installed, need to configure to point to MinGW, etc.)
  • Smaller download size and RAM requirements. With IntelliSense it requires around 300 MB RAM. (Edit : Some header files tend to blow up memory requirements to 7-8 GBs eg. OpenGL and GLM Libraries)
  • It works on lower-end PCs. (it is still slow to start up especially if PowerShell is used instead of CMD)
  • Lower support (open source, so you can modify it yourself)
  • Build tasks are project specific. Even if you want to build it in a vanilla configuration.
  • Mostly used for web development (this applies to all free text editors). They tend to show off JavaScript / HTML support over C/C++. Visual Studio shows off Visual Basic/C++ over other languages.
  • Lack of good extensions (it's still new though)
  • Gives you a hard time to reconfigure your project/workspace settings. I prefer the GUI way.
  • Cross platform
  • Has an integrated terminal (PowerShell is too slow at startup though)
  • It is best for smaller projects and test code (you know if you are bored and want to print "Hello, World!", it does not make sense to wait 3-5 minutes while Visual Studio loads up, and then another minute or 2 at project creation and then finally getting it to print "Hello, World!").
Recoder
  • 818
  • 8
  • 10
  • 1
    I do not think that symbolic debugging is a typical "Free Open Source Text Editor" feature, to VS Code e is definitely not a Source Text Editor. – g.pickardou Jan 18 '19 at 06:30
54

Complementing the previous answers, one big difference between both is that Visual Studio Code comes in a so called "portable" version that does not require full administrative permissions to run on Windows and can be placed in a removable drive for convenience.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
LCO TEC BAJA
  • 678
  • 5
  • 5
27

For Unity3D users ...

  • VSCode is incredibly faster than VS. Files open instantly from Unity in VSCode. Whereas VS is extremely slow.

  • VS can literally compile code, build apps and so on, it's a huge IDE like Unity itself or XCode. VSCode is indeed "just" a full-featured text editor. VSCode is NOT a compiler: VSCode is literally "just a text editor".

  • With VSCode, you DO need to install in projects the "Visual Studio Code" package.

enter image description here

  • When you first download and install VSCode, simply open any C# file on your machine. It will instantly prompt you to install the needed C# package. This is harmless and easy.

  • Unfortunately VSCode generally has only one window! To open another window is a fuss.

  • In VS, it is all-but impossible to change the editor font, etc. In contrast, VSCode has FANTASTIC preferences - dead simple, never a problem.

  • As far as I can see, every single feature in VS which you use in Unity is present in VSCode. (So, code coloring, jump to definitions, it understands/autocompletes every single thing in Unity, it opens from Unity, double clicking something in the Unity console opens the file to that line, etc etc)

  • If you are used to VS. And you want to change to VSCode. It's always hard changing editors, they are so intimate, but it's pretty similar; you won't have a big heartache.

In short if you're a VS for Unity3D user,

and you're going to try VSCode...

  1. VSCode is on the order of 19 trillion times faster in every way. It will blow your mind.

  2. It does seem to have every feature.

  3. Basically VS is the world's biggest IDE and application building system: VSCode is just an editor. (Indeed, that's exactly what you want with Unity, since Unity itself is the IDE.)

  4. Don't forget to just click to install the relevant Unity package.

If I'm not mistaken, there is no reason whatsoever to use VS with Unity.

Unity is an IDE so you just need a text editor, and that is what VSCode is. VSCode is hugely better in both speed and preferences. The only possible problem - multiple-windows are a bit clunky in VSCode!

That horrible "double copy" problem in VS ... solved!

If you are using VS with Unity. There is an infuriating problem where often VS will try to open twice, that is you will end up with two or more copies of VS running. Nobody has ever been able to fix this or figure out what the hell causes it. Fortunately, this problem never happens with VSCode.

Installing VSCode on a Mac - unbelievably easy.

There are no installers, etc etc etc. On the download page, you download a zipped Mac app. Put it in the Applications folder and you're done.

Folding! (Mac/Windows keystrokes are different)

Bizarrely there's no menu entry / docu whatsoever for folding, but here are the keys:

https://stackoverflow.com/a/30077543/294884

Setting colors and so on in VSCode - the critical tips

Particularly for Mac users who may find the colors strange:

Priceless post #1:

https://stackoverflow.com/a/45640244/294884

Priceless post #2:

https://stackoverflow.com/a/63303503/294884

Meta files ...

To keep the "Explorer" list of files on the left tidy, in the Unity case:

enter image description here

Fattie
  • 27,874
  • 70
  • 431
  • 719
  • 9
    "In VS, it is all-but impossible to change the font" is false. Tools->Options->Environment->Fonts and Colors. Not "all but impossible". – Jack Aidley Nov 17 '20 at 14:26
  • 1
    So can you do step through debugging with breakpoints in VS code? Because if not then VS is still needed. – WDUK Mar 03 '22 at 06:27
  • @WDUK yes you can , make sure you solve Omni sharp errors first though – Kepol Jul 27 '22 at 12:48
10

As of 2021 I believe the main differences are:

  • Visual Studio Code is a completely new codebase (based on Electron) than the "old" Visual Studio, it is open source and is actively developed "in the open" (on github)
  • Visual Studio is more focused on "traditional" Windows GUI apps development, and it is battery-included for that, including WYSIWYG programming style of the GUI ("visual")
  • Visual Studio Code, while pretty "nude" on its own, had attracted lots of community development for extensions to do the most crazy things. Community developed extensions exist to use it as a base for an integrated development editor for almost any programming language (for example I use it for Julia)
Antonello
  • 6,092
  • 3
  • 31
  • 56
8

Out of the box, Visual Studio can compile, run and debug programs.

Out of the box, Visual Studio Code can do practically nothing but open and edit text files. It can be extended to compile, run, and debug, but you will need to install other software. It's a PITA.

If you're looking for a Notepad replacement, Visual Studio Code is your man.

If you want to develop and debug code without fiddling for days with settings and installing stuff, then Visual Studio is your man.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
AllenKll
  • 1,006
  • 2
  • 12
  • 23
  • 2
    This is painfully inaccurate, but maybe it has changed a lot since this answer was given. If you open most code file types for the first time in VSCode, it automatically looks for a plugin, finds it, and pops up with a little message in the bottom right saying click to install it. You click. It installs in the background very quickly. Then you instantly have a basic IDE experience for the language or framework with syntax highlighting, autocomplete, error checking, compiling, debugging, etc. In my experience it's quicker and easier to get set up and rolling with VSCode than VS now. – dallin Dec 18 '22 at 19:29
6

One huge difference (for me) is that Visual Studio Code is one monitor only. With Visual Studio you can use multi-screen setups.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Juan Alvarez
  • 307
  • 2
  • 5
  • 1
    Duplicate workspace action might help you a bit. You can drag tabs across different windows as well. – Piotr Sep 09 '21 at 15:26
5

Visual Studio Code is for more of a pure code development tool while VS2019/VS2017 etc. is for more of a non-coding approach for developing programs. In VS you while get button tools and window toolbar tools and all that fancy stuff. In VSC you have to code the whole thing from scratch. I recommend VSC for people who are just learning to code but VS for advanced devs.

4

Visual Studio Code is integrated with a command prompt / terminal, hence it will be handy when there is switching between IDE and terminal / command prompt required, for example: connecting to Linux.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Kushhh Alll
  • 91
  • 1
  • 6
4

In short, VSCode heavily promotes (Microsoft's) TypeScript compiler, and bundles first-class support for the language, which makes the editor web-centric, while Visual Studio is primarily used for Microsoft's native, C-family, Windows/XBox stuff.

3

For me, Visual Studio on Mac doesn't support Node.js (editing and debugging) whereas Visual Studio Code does this very well.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Paul Bartlett
  • 673
  • 1
  • 9
  • 14
2

As VS Code has been heavily developed every month, A new answer is worth.

I'm an ASP.net developer in Visual Studio for ten years. When I see in the Stackoverflow survey (https://insights.stackoverflow.com/survey/2021#section-most-popular-technologies-integrated-development-environment) that VS Code is the the first IDE of choice, I decided to give it a try by using it as my main develop environment, and here's the result after one month:

I can say if only VS Code has an scalable and stable intellisense like VS has, I would keep it as my first choice of IDE for dotnet. Omnisharp (VS Code C# intellisense) is satisfying for small projects but as the workspace becomes bigger (for example when you have more than one projects in your workspace) the instability starts to becomes a problem.

I still use VS Code for small dotnet projects and also as a DB Client, powershell ISE, python, etc. because of it's lightness, feature richness, customizability and having such an alive community and develop team.

obviously the situation can change by whether VS Code getting a VS-level dotnet intellisense, or VS get more game-changing features.

HamedH
  • 2,814
  • 1
  • 26
  • 37
  • Not sure how big is the solution we are talking about here, but I worked on solutions with average 15 ~ 30 projects, and never had a single issue with Intellisense. The only issue is that Debug console doesn't support it yet. Another issue is that if your solution doesn't build, you might face Intellisense issues. TBH, Visual Studio is always slow, whether it is 1 project or 100s – Nour Aug 22 '22 at 10:42