450 likes | 581 Views
TL32. Microsoft Visual Studio: Customizing And Extending Your Development Environment . Tim Wagner Visual Studio Platform Dev Manager Microsoft Corporation. Agenda. Extending Visual Studio Finding extensions on VS Gallery Using the SDK to create packages
E N D
TL32 Microsoft Visual Studio: Customizing And Extending Your Development Environment Tim Wagner Visual Studio Platform Dev Manager Microsoft Corporation
Agenda • Extending Visual Studio • Finding extensions on VS Gallery • Using the SDK to create packages • Creating branded, standalone apps • Visual Studio 10 Extensibility • Customizing the start page • Building “drop in” components with MEF • Extending the VS 10 editor • Managing extensions and downloads
Extend Your Development Experience • Find Tools • Online Gallery • CodePlex • New Visual Studio 10 download manager • Customize Tools • Templates • Code Snippets • Macros • Start Page • Debugger visualizations • Build Tools • Add-ins • Packages • Designers • DSLs • Editor components
demo Power Commands
Custom Package: Tool Window • Create custom tool window • Content • XAML viewer • DTE actions • Use SDK sample browser to initiate • Visual Studio 10 changes • WPF shell
Aside: "DTE" • Development Tools Extensibility • High-level APIs for controlling Visual Studio: • Drive the UI • Create and manage projects • Open, edit, save files • Invoke commands • Used by macros and addins, but useful for packages as well • Our tool window will hook up a WPF button to a DTE command
demo XAML Tool Window
Deployment Options • Empty IDE • Free redistribution • Great foundation for standalone tools VS Extension
Resources • VSX Developer Centerhttp://msdn.com/vsx • VSX Forums on MSDNhttp://social.msdn.microsoft.com/forums/en-US/vsx/threads • VSX Team Bloghttp://blogs.msdn.com/vsxteam • Visual Studio Galleryhttp://visualstudiogallery.com/
Agenda • Extending Visual Studio • Finding extensions on VS Gallery • Using the SDK to create packages • Creating branded, standalone apps • Visual Studio 10 Extensibility Offerings • Customizing the start page • Building “drop in” components with MEF • Extending the VS 10 editor • Managing extensions and downloads
demo Custom Start Page (XAML)
Coming Up: Components! • New managed extensibility mechanism designed from the ground up • All managed – no COM artifacts • Component and contract based • Used for emerging Visual Studio architecture • Appears first in the editor • Characterized by ease of construction and deployment… • Self describing payloads, “xcopy” semantics • DILU (drop-in, light up) deployment • *Not* focused on hot deploy in first release
Component Model Part A I need "Foo" I need "Foo" I provide "Foo" Part B Part C
MEF Example: Host and Contract static void Main(string[] args) { var container = new CompositionContainer(); varconsoleWriter = new ConsoleWriter(); container.AddPart(consoleWriter); container.AddPart(new DateOutputFormatter()); container.Compose(); consoleWriter.Write("Hello MEF, my first MEF app"); Console.ReadLine(); } public interface IOutputFormatter { string Format(string message); }
MEF Example: Provide/Consume [Export(typeof(IOutputFormatter))] public class DateOutputFormatter : IOutputFormatter { public string Format(string message) { return string.Format("{0}: {1}", DateTime.Now, message); } } public class ConsoleWriter { [Import] public IOutputFormatter Formatter { get; set; } public void Write(string message) { Console.WriteLine(Formatter.Format(message)); } }
Catalogs Discover Parts Container Catalog Catalog
MEF In The Visual Studio Editor • The new editor is built entirely from MEF components • Extending or modifying the editor amounts to providing your own components • Many extensibility points designed to capture common paradigms…
Classification: Rich Text Formatting • Rich reading experience • Multiple fonts • Font styles and effects • Opacity • Higher performance • Fewer coloring requests to language services • Composable • 3rd party “mixins” easily supported • Per-line transforms
Adornments: Powerful Graphics • Any WPF visual • Drawn on one of several planes • Two tracking modes • Associate with text • Associate with screen • Animation and behavior
Margin And Scrollbar Control • Replace or customize existing margins and scrollbar • Define new margins • All four sides • Support for spatial mapping
Intellisense And Smart Tags • Any 3rd party (not just language services) can: • Contribute to Completion • Override the presentation of Parameter Help or Quick Info • Add menu items to Smart Tags
demo Editor Components –Highlight Word
Managing Your Extensions • What if you could discover and search for extensions within the IDE? • What if you could install, manage, and update extensions there as well? • What if we could make publishing IDE extensions (of all flavors) easy, fast, and fun?
Extension Manager • New “in situ” experience for extensions… • Discover (via VS Gallery) • Download/install/manage • Update • Simplified packaging and deployment • Same DILU semantics, but for both existing and new extensibility mechanisms • Xcopy deploy; no magic, no hidden state • Think unzip and a manifest in XML • VS SDK will deliver simplified authoring and “one step” publication story • Used by Visual Studio and 3rd parties
Agenda • Extending Visual Studio • Finding extensions on VS Gallery • Using the SDK to create packages • Creating branded, standalone apps • Visual Studio 10 Extensibility • Customizing the start page • Building “drop in” components with MEF • Extending the VS 10 editor • Managing extensions and downloads • Your turn! • Download the 2008 SDK and try the 2010 CTP
Microsoft Visual Studio: Customizing and Extending Your Development Environment Q&A
Evals & Recordings Please fill out your evaluation for this session at: This session will be available as a recording at: www.microsoftpdc.com
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.