{"id":6151,"date":"2016-04-01T10:00:09","date_gmt":"2016-04-01T17:00:09","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/visualstudio\/?p=6151"},"modified":"2019-03-19T23:52:18","modified_gmt":"2019-03-20T06:52:18","slug":"visual-studio-15-take-on-dependencies-stay-productive","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/visual-studio-15-take-on-dependencies-stay-productive\/","title":{"rendered":"A Vision For Visual Studio &#8220;15&#8221;: Take on Dependencies. Stay Productive."},"content":{"rendered":"<p>When it comes to leveraging OSS and other reusable components, developers have more options today than ever before. Productivity gains from taking on external dependencies can evaporate quickly though, when you need to spend time debugging or searching for dependency source code. To do these tasks, you might need to enlist and rebuild a library (and replace all solution references to this rebuilt version) to take advantage of Visual Studio capabilities like \u201cgo to definition\u201d that \u201cjust work\u201d for your own project code.<\/p>\n<p>Visual Studio debugging and code exploration works pretty well (if we do say so ourselves) when you\u2019re building everything in your solution. Well, what if VS worked just as well for code that you aren\u2019t compiling? Code that you compile from a completely different solution, for example? Or even code you\u2019ve dropped in as a NuGet dependency? While we have the hood up, what if Visual Studio could help with search scenarios <i>before <\/i>you take on a dependency?<\/p>\n<p>This post presents a set of ideas that we are considering or have started to implement in Visual Studio \u201c15\u201d to keep developers productive when they take on OSS and other external dependencies. Take a look at this video for a lightning tour of what we have in mind and let us know what you think.<\/p>\n<p><iframe width=\"750\" height=\"435\" allowfullscreen=\"allowfullscreen\" frameborder=\"0\" src=\"https:\/\/www.youtube.com\/embed\/DvJoYlaKgEA\">\n<\/iframe><\/p>\n<p>To follow along at a different pace, keep reading \u2026<\/p>\n<p>Do any of the following problems sound familiar? You open a dependency source file from outside your solution and it doesn\u2019t colorize completely. You set a breakpoint on a call to an OSS dependency you\u2019d like to debug and VS steps over it. Or you hit F12 on an external call and VS offers a \u201cmetadata view\u201d instead of the actual implementation:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2016\/04\/2016-04-01-BUILD-SearchAndNavigate-MetaDataView.png\" alt=\"\" \/><\/p>\n<p>What if we could make all these problems disappear? What if we could make sure that all of Visual Studio\u2019s rich code debugging, search and exploration features keep working without requiring that you download and build dependency source code, or locate dependency symbols? That\u2019d be great, right?<\/p>\n<p>Let\u2019s take a quick tour through an end-to-end example of what this might look like, starting with acquiring a useful code snippet from the web and adding it to a fresh project (with no dependencies).<\/p>\n<h2>Useful code samples found without leaving Visual Studio<\/h2>\n<p>We\u2019ll start with something that you can do today in Visual Studio: locate useful code snippets without leaving the IDE. The Bing team is updating this <a href=\"https:\/\/visualstudiogallery.msdn.microsoft.com\/site\/search?query=developer%20assistant&amp;f%5B0%5D.Value=developer%20assistant&amp;f%5B0%5D.Type=SearchText&amp;ac=5\">extension<\/a> right now to provide even better search results for \u201chow to\u201d scenarios (by adding new \u201cfuzzy match\u201d search capabilities). In our \u201cwhat if\u201d scenario, we\u2019ll look for a code snippet that can convert an XML string to the JSON format.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2016\/04\/2016-04-01-BUILD-SearchAndNavigate-UsefulSamplesWithinVisualStudio.png\" alt=\"\" \/><\/p>\n<h2>Visual Studio makes it all compile.<\/h2>\n<p>Now that we\u2019ve located a useful snippet, we paste it into the editor. Visual Studio \u201c15\u201d can apply auto-fixers that make it all compile, with minimal keystrokes. VS can even suggest and install the NuGet packages you need to make everything work. This feature is shipping in the Visual Studio \u201c15\u201d <a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/visual-studio-15-preview\/\">preview bits<\/a> that you can download today.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2016\/04\/2016-04-01-BUILD-SearchAndNavigate-VisualStudioMakesItAllCompile.png\" alt=\"\" \/><\/p>\n<h2>\u201cGo to definition\u201d just works.<\/h2>\n<p>Now we get to new magic we have in mind. What if you never saw a metadata view again or a message that VS \u201ccould not resolve symbol under the caret\u201d? What if \u201cgo to definition\u201d always worked for all the code your solution pulls in?<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2016\/04\/2016-04-01-BUILD-SearchAndNavigate-GoToDefinition.png\" alt=\"\" \/><\/p>\n<h2>Debugging works. With no extra work.<\/h2>\n<p>If you run into an unexpected problem and need to debug your external dependencies, that can slow you down at the worst possible time. For Visual Studio \u201c15\u201d, we\u2019d like to make it so that you can set and hit breakpoints without doing any extra work. No more searching the web for PDBs or source server information. No more cloning repos and rebuilding them locally, just to fix a single bug.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2016\/04\/2016-04-01-BUILD-SearchAndNavigate-Debugging.png\" alt=\"\" \/><\/p>\n<h2>Search dependency code as well as yours.<\/h2>\n<p>Searching code is critical to productivity and you should be able to comprehensively search external code bases that you depend on. What if we could improve \u201cfind all references\u201d, for example, to locate usage patterns within a dependency\u2019s source code on GitHub as well as yours? We\u2019re looking at it for Visual Studio \u201c15\u201d.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2016\/04\/2016-04-01-BUILD-SearchAndNavigate-SearchDependencyCodeAndYourOwnCode.png\" alt=\"\" \/><\/p>\n<h2><\/h2>\n<h2>Tell us what you think. We\u2019ll move forward.<\/h2>\n<p>Altogether, we think the experiences described above would be a great advance in developer productivity. These features should also help with extremely complex projects, where teams take on many dependencies coded elsewhere in their company (but which they don\u2019t compile in their own solutions). What do you think? Let us know!<\/p>\n<table border=\"0\" width=\"700\" cellspacing=\"0\" cellpadding=\"2\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"150\"><img decoding=\"async\" class=\"\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2016\/04\/Michael-C.-Fanning.png\" alt=\"\" width=\"163\" height=\"183\" \/><\/td>\n<td valign=\"top\" width=\"500\"><strong>Michael C. Fanning<\/strong>, Principal SDE, Visual StudioMichael is a developer and technical lead in the Compiler Language &amp; Platform team in Developer Division. Michael has been at Microsoft for a long time, primarily working on developer technologies and security.<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"150\"><img decoding=\"async\" class=\"\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2016\/04\/Joe-Morris.jpg\" alt=\"\" width=\"161\" height=\"196\" \/><\/td>\n<td valign=\"top\" width=\"500\"><strong>Joe Morris<\/strong>, Senior Program Manager, Visual Studio\n<a href=\"https:\/\/twitter.com\/_jomorris\">@_jomorris<\/a>Joe has been with Microsoft for 19 years, with a particular focus on static analysis and developer productivity for the last three years.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>When it comes to leveraging OSS and other reusable components, developers have more options today than ever before. Productivity gains from taking on external dependencies can evaporate quickly though, when you need to spend time debugging or searching for dependency source code. To do these tasks, you might need to enlist and rebuild a library [&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":[155],"tags":[9],"class_list":["post-6151","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-visual-studio","tag-debug"],"acf":[],"blog_post_summary":"<p>When it comes to leveraging OSS and other reusable components, developers have more options today than ever before. Productivity gains from taking on external dependencies can evaporate quickly though, when you need to spend time debugging or searching for dependency source code. To do these tasks, you might need to enlist and rebuild a library [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/6151","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=6151"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/6151\/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=6151"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=6151"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=6151"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}