{"id":6403,"date":"2016-04-12T09:30:00","date_gmt":"2016-04-12T16:30:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/visualstudio\/?p=6403"},"modified":"2019-10-24T17:38:57","modified_gmt":"2019-10-25T00:38:57","slug":"open-any-folder-with-visual-studio-15-preview","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/open-any-folder-with-visual-studio-15-preview\/","title":{"rendered":"Open Any Folder with Visual Studio &#8220;15&#8221; Preview"},"content":{"rendered":"<p>For developers to be truly productive in Visual Studio their code needs to be organized into Solutions and projects, <i>right<\/i>?<\/p>\n<p>For a long time, 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\u2019t \u2013 even for languages that Visual Studio has great support for. Many developers start a project by searching GitHub to see what problems other developers have already solved that might be similar to the new project they\u2019re working on. Unfortunately, since most of these projects lack a Solution file, onboarding them into Visual Studio is tedious.<\/p>\n<p>For these developers, we are introducing a new way to work with code in Visual Studio. <a href=\"https:\/\/www.visualstudio.com\/downloads\/visual-studio-next-downloads-vs\">Visual Studio \u201c15\u201d Preview<\/a> can open any folder and:<\/p>\n<ul>\n<li>Edit code.<\/li>\n<li>Navigate to symbols.<\/li>\n<li>Build.<\/li>\n<li>Debug and place breakpoints.<\/li>\n<\/ul>\n<p>All of this works without any projects or Solutions.<\/p>\n<p>With Visual Studio \u201c15\u201d Preview, you can now clone any of these repos and open the folder directly. This means that you won\u2019t have to spend time creating a new Solution or project file. This in turn ensures that you will be able to launch more quickly into solving your coding problem.<\/p>\n<p>This new capability to open a folder that has an unknown or missing Solution or project file also comes with the following support features:<\/p>\n<ul>\n<li>Most popular languages will have Syntax Highlighting and navigation:<\/li>\n<\/ul>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/04122016-BUILD-OpenFolder-SyntaxHighlightingAndNavigation.png\"><img decoding=\"async\" title=\"\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2016\/04\/04122016-BUILD-OpenFolder-SyntaxHighlightingAndNavigation.png\" alt=\"Syntax Highlighting And Navigation\" \/><\/a><\/p>\n<ul>\n<li>Many languages can be debugged as well. Node.js, Python, C#, C++, and VB in the Preview, more coming soon.<\/li>\n<li>Git version control is integrated with open folders.<\/li>\n<\/ul>\n<p>There are two ways to open a folder in Visual Studio. In the Windows Explorer context menu on any folder, you can click \u201cOpen in Visual Studio\u201d. Or on the File menu, click Open, and then click Folder. Recent folders will be persisted to the MRU.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/04122016-BUILD-OpenFolder-OpenFromWindowsExplorerOrFileMenu.png\"><img decoding=\"async\" title=\"\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2016\/04\/04122016-BUILD-OpenFolder-OpenFromWindowsExplorerOrFileMenu.png\" alt=\"Open From Windows Explorer Or File Menu\" \/><\/a><\/p>\n<h2>Debugging<\/h2>\n<p>No Visual Studio feature would be complete without a robust debugging experience. Visual Studio \u201c15\u201d Preview supports debugging Node.js, Python, MSBuild based project (C#, C++, VB), and any executable with PDBs.<\/p>\n<h2>Node.js and Python<\/h2>\n<ol>\n<li>Install <a href=\"https:\/\/github.com\/Microsoft\/nodejstools\">Node.js<\/a> or <a href=\"https:\/\/github.com\/Microsoft\/PTVS\">Python<\/a> Tools or Visual Studio \u201c15\u201d Preview and the Node.js runtime.<\/li>\n<li>Right-click any JavaScript file in the Solution Explorer, and then click \u201cSet as Startup Item.\u201d<\/li>\n<li>Press F5*.<\/li>\n<\/ol>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/04122016-BUILD-OpenFolder-SolutionExplorerRightClickSetUpAsStartupItem.png\"><img decoding=\"async\" title=\"\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2016\/04\/04122016-BUILD-OpenFolder-SolutionExplorerRightClickSetUpAsStartupItem.png\" alt=\"Solution Explorer Right Click Set Up As Startup Item\" \/><\/a><\/p>\n<p>* For Python, there is an additional step. Click the debug dropdown, and then select \u201cCustomize\u201d and add the following property to the file\u2019s launch configuration. Now you are ready to F5. This extra step will be removed in a future release.\n&#8220;pythonInterpreter&#8221;: &#8220;c:\\{Path To Python}\\python.exe&#8221;<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/04122016-BUILD-OpenFolder-PythonInterpreter.png\"><img decoding=\"async\" title=\"\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2016\/04\/04122016-BUILD-OpenFolder-PythonInterpreter.png\" alt=\"Add property Python Interpreter\" \/><\/a><\/p>\n<h2>MSBuild Projects<\/h2>\n<ol>\n<li>In the debug dropdown menu, select the project (or select the project or file that you want to display as the \u201cStartup Item\u201d in the Solution Explorer).<\/li>\n<li>Press F5.<\/li>\n<\/ol>\n<h2>Executables<\/h2>\n<ol>\n<li>Select the EXE as the \u201cStartup Item\u201d in the Solution Explorer.<\/li>\n<li>Verify that the PDBs next to the EXE are up to date.<\/li>\n<li>Press F5.<\/li>\n<\/ol>\n<h2>Debugging the Current Document<\/h2>\n<ol>\n<li>If you have selected \u201cCurrent Document\u201d in the debug dropdown, Visual Studio will attempt to debug the current document (for example a script) or the project that it belongs to.<\/li>\n<li>If the current document cannot be debugged, Visual Studio will ask you to select a startup item manually through the Solution Explorer context menu.<\/li>\n<li>This is the default selection in the debug dropdown menu.<\/li>\n<\/ol>\n<h2>Customizing F5<\/h2>\n<p>You can customize F5 as well, for instance, passing command line arguments to the debugger process. More customization will be available in future releases.<\/p>\n<h2>Command Line Arguments<\/h2>\n<p>In the debug dropdown, click \u201cCustomize\u201d and add the following property to the file\u2019s launch configuration:\n&#8220;args&#8221;: [&#8220;arg1&#8221;, &#8220;arg2&#8221;]<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/04122016-BUILD-OpenFolder-CommandLineArguments.png\"><img decoding=\"async\" title=\"\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2016\/04\/04122016-BUILD-OpenFolder-CommandLineArguments.png\" alt=\"Command Line Arguments\" \/><\/a><\/p>\n<h2>Summary<\/h2>\n<p>With Visual Studio \u201c15\u201d Preview, we\u2019ve worked hard to simplify the basics and make it easier for you to launch into the fun stuff. The open folder feature will save you time and headaches in trying to assess whether a repo gets you 80% there or has already solved the problem for you. This feature is also fully extensible. More details and documentation about the features extensibility will be available soon.<\/p>\n<p>There are a few things to keep in mind 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 change in future releases of Visual Studio.<\/p>\n<table border=\"0\" width=\"857\" cellspacing=\"0\" cellpadding=\"2\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"184\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2016\/04\/2845.image_642EB526.png\" alt=\"\" \/><\/td>\n<td valign=\"top\" width=\"671\"><strong>Will Buik<\/strong> \u2013 Program Manager, Visual Studio IDE Project and Build<\/p>\n<p>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.\u00a0 He loves working on the development tools that he has leveraged for many years.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>For developers to be truly productive in Visual Studio their code needs to be organized into Solutions and projects, right? For a long time, 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 [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":255385,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[4980,155],"tags":[237,1383,9,376,124,185,172,653],"class_list":["post-6403","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java","category-visual-studio","tag-net","tag-c","tag-debug","tag-java","tag-javascript","tag-node-js","tag-python","tag-visual-basic"],"acf":[],"blog_post_summary":"<p>For developers to be truly productive in Visual Studio their code needs to be organized into Solutions and projects, right? For a long time, 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 [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/6403","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/comments?post=6403"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/6403\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media\/255385"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media?parent=6403"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=6403"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=6403"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}