Open Any Folder with Visual Studio "fifteen" Preview

Visual Studio

For developers to exist truly productive in Visual Studio their code needs to be organized into Solutions and projects, right?

For a long fourth dimension, that was a core expectation of how Visual Studio works. Unfortunately, this requirement is a bit of a burden for those of you working across multiple tools and platforms. Sometimes Solutions make a lot of sense, sometimes they don't – fifty-fifty for languages that Visual Studio has nifty support for. Many developers start a project past searching GitHub to see what problems other developers have already solved that might exist similar to the new projection they're working on. Unfortunately, since most of these projects lack a Solution file, onboarding them into Visual Studio is deadening.

For these developers, we are introducing a new mode to work with code in Visual Studio. Visual Studio "15" Preview can open up whatever folder and:

  • Edit code.
  • Navigate to symbols.
  • Build.
  • Debug and place breakpoints.

All of this works without any projects or Solutions.

With Visual Studio "fifteen" Preview, yous can now clone any of these repos and open the folder directly. This means that you won't have to spend fourth dimension creating a new Solution or project file. This in turn ensures that you lot will be able to launch more quickly into solving your coding trouble.

This new adequacy to open a folder that has an unknown or missing Solution or project file besides comes with the following support features:

  • Nigh pop languages will accept Syntax Highlighting and navigation:

Syntax Highlighting And Navigation

  • Many languages tin can exist debugged as well. Node.js, Python, C#, C++, and VB in the Preview, more coming soon.
  • Git version command is integrated with open up folders.

In that location are two ways to open a binder in Visual Studio. In the Windows Explorer context menu on any folder, you lot can click "Open up in Visual Studio". Or on the File bill of fare, click Open, and and so click Folder. Recent folders will be persisted to the MRU.

Open From Windows Explorer Or File Menu

Debugging

No Visual Studio feature would be complete without a robust debugging feel. Visual Studio "15" Preview supports debugging Node.js, Python, MSBuild based projection (C#, C++, VB), and whatsoever executable with PDBs.

Node.js and Python

  1. Install Node.js or Python Tools or Visual Studio "15" Preview and the Node.js runtime.
  2. Correct-click any JavaScript file in the Solution Explorer, and and then click "Set as Startup Particular."
  3. Press F5*.

Solution Explorer Right Click Set Up As Startup Item

* For Python, there is an additional step. Click the debug dropdown, and so select "Customize" and add together the following holding to the file's launch configuration. At present you are ready to F5. This extra step will be removed in a hereafter release. "pythonInterpreter": "c:\{Path To Python}\python.exe"

Add property Python Interpreter

MSBuild Projects

  1. In the debug dropdown card, select the project (or select the project or file that y'all desire to brandish as the "Startup Item" in the Solution Explorer).
  2. Printing F5.

Executables

  1. Select the EXE equally the "Startup Item" in the Solution Explorer.
  2. Verify that the PDBs next to the EXE are upwards to date.
  3. Press F5.

Debugging the Current Document

  1. If you lot accept selected "Current Document" in the debug dropdown, Visual Studio will attempt to debug the current document (for example a script) or the project that it belongs to.
  2. If the current certificate cannot exist debugged, Visual Studio volition inquire yous to select a startup item manually through the Solution Explorer context menu.
  3. This is the default pick in the debug dropdown card.

Customizing F5

You lot can customize F5 as well, for instance, passing command line arguments to the debugger process. More customization will be available in hereafter releases.

Command Line Arguments

In the debug dropdown, click "Customize" and add the following belongings to the file's launch configuration: "args": ["arg1", "arg2"]

Command Line Arguments

Summary

With Visual Studio "fifteen" Preview, nosotros've worked hard to simplify the basics and make it easier for yous to launch into the fun stuff. The open folder feature volition save y'all time and headaches in trying to assess whether a repo gets you 80% there or has already solved the problem for you lot. This characteristic is as well fully extensible. More details and documentation most the features extensibility volition exist available presently.

There are a few things to keep in heed though. This is a preview release, so the feature still has a few rough edges. The configuration syntax, especially in launch.json, is likely to modify in future releases of Visual Studio.

Will Buik – Plan Manager, Visual Studio IDE Project and Build

Will is a long time user of Visual Studio. Since his foray into programing with Visual Basic 4, he has loved programming, software development, and hardware hacking.  He loves working on the development tools that he has leveraged for many years.