ããã«äºçŽããŸãã ããã«æžããããã®ã¯ãã¹ãŠç§ã ãã®ç§èŠã§ãã ç§ã¯ééã£ãŠããå¯èœæ§ããããããªããç§ãä¿®æ£ããŠãããã°å¬ããã§ã:)
ç§ã¯ãã·ã¢èªã§æžããŠããã®ã§ãå°éçšèªãšébarãã䜿ããŸãããå¿ èŠãªçšèªã®ãã·ã¢èªã®é¡äŒŒç©ããªãããæå³ãæ£ç¢ºã«äŒããŠããŸããã
ããŠããã€ã³ããŸã§ã
ãã®èšäºã§ã¯ãæåã®è¿äŒŒãšããŠãVisual Studioã®æ©èœãæ¡åŒµããå¯èœæ§ã«ã€ããŠé¢å¿ãæã£ãŠãã人ã ãã€ãŸãVisual Studio Extensibilityã®ããã¯ãããžãŒãã«ã€ããŠèª¬æããŸãã
ããžã¥ã¢ã«ã¹ã¿ãžãªã®æ¡åŒµæ§
ãåç¥ã®ããã«ã Microsoft Visual Studioã¯éçºç°å¢ïŒ IDE ïŒã§ãã ããã«ãæ¡åŒµå¯èœãªç°å¢ã
ç°å¢ã¯åçŽã§ã¯ãªããé·ãæŽå²ããããããã«åºã¥ããŠæ·±å»ãªãã®ãå®è£ ã§ãããšããäºå®ã®ããã«ãVisual Studio ExtensibilityïŒ VSX ïŒãšããçšèªãç»å ŽããŸããã
ã¹ã¿ãžãªã«ã¯10幎ã®æŽå²ããããŸãã COMéçºã®ããã«ã COMæéã§äœæãããŸããïŒåœŒããåæ Œããªãã£ãããšã¯ç¥ã£ãŠããŸãïŒã ãã®åŸã圌女ã¯äž»ãªç®çã.NETéçºã«å€æŽããŸããã ãã ããCOMããŒã¹ã®ã¢ããªã±ãŒã·ã§ã³ã®ãŸãŸã§ãã£ããããäž»ãªæ¡åŒµæ§ã¯ãã®COMã®æ§è³ªã«çŽæ¥é¢ä¿ããŠããŸãã ãã®ããã«ãæ¡åŒµæ§ã.NETããã³COMã®çžäºéçšæ§ã䜿çšãããŸãã ããã¯ééããªããæ¡åŒµããã»ã¹ã«é åãšç¹å®ã®é åããããããŸãïŒç®èã®ã»ãã®äžéšïŒã
ããŒãžã§ã³ããããŒãžã§ã³ãžã®ã¹ã¿ãžãªã³ã¢ã¯åºæ¬çã«2002ããŒãžã§ã³ãšåãã§ãããæ°æ©èœã®ã»ãšãã©ïŒVS2005ãVS2008ãVS2010ïŒã¯VSXã®ãã¯ãŒã䜿çšããŠå®è£ ãããŠããŸãã
æ®å¿µãªãããVSXã§äœæ¥ããéçºè ã¯ãé·å¹Žã«ããã£ãŠããŸããŸãªäººã ã«ãã£ãŠéçºãããäœåºŠãããçŽãããŠãããé åçãªã³ãŒããã«å¯ŸåŠããå¿ èŠããããŸãã ãŸããã¹ã¿ãžãªã®æ§è³ªãšãå Žåã«ãã£ãŠã¯éçºã®ã¹ã±ãžã¥ãŒã«ãå³ããããšãèæ ®ãããšãéçºè ãã©ãã»ã©å€ãã®èå³æ·±ãé©ããèŠãããšãã§ãããæ³åã§ããŸãã æ®å¿µãªããããšã³ãã£ãã£ã«ååãä»ããããšãããäžèªç±ã§ãã
ãããŠæåŸã«ãåºç¯ã§ç解ããããããã¥ã¡ã³ãã®å ¥æå¯èœæ§ããŸãã¯ããããã®äžåšãªã©ã®åŽé¢ã¯ãããã®éçºè ã«ããVSXã®äœ¿çšã«äžå¯è§£ã§éæ³ã®ãããªé åããããããŸãã æ¢ã«å®è£ ãããŠãããœãªã¥ãŒã·ã§ã³ãç 究ãããããã«åºã¥ããŠæ°ãããœãªã¥ãŒã·ã§ã³ãçºæããããšããããäœããšããµã€ãã£ã³ã°ãªããšã§ããããïŒ
ã¹ã¿ãžãªãæ¡åŒµããçç±
å®éããªãã¹ã¿ãžãªæ¡åŒµãå¿ èŠãªââã®ã§ããïŒ èããŠã¿ããšãç§ãã¡ïŒã€ãŸããããŒïŒãæ¥åžžç掻ã§äœ¿çšããŠããå€ãã®VSXããŒã¹ã®ãœãªã¥ãŒã·ã§ã³ãèŠã€ããããšãã§ããŸãã WPF ã Silverlightããã³XAML ã WCF ã LINQ ã OfficeçšããŒã« ã Crystal Reports ã Workflow Foundation ããã¹ããããžã§ã¯ã-MSã®éçºã以åã®ããŒãžã§ã³ã®ã¹ã¿ãžãªã«ã¯ãããŸããã§ããããé²æ©ã®ããã«ç»å ŽããŸããã 次ã«-å®éã«ã¯VSXã¯ãããèªäœã«åºã¥ããŠãããçµ±åããã±ãŒãžãDSLããŒã«ãªã©ãå«ãŸããŠããŸãã æåãªReSharper ã AnkhSVN ã XMLSpy ã GhostDoc ã ããããããŸãç¥ãããŠããªãCodeRush ã TestDriven.NET ã Smart Paster ã .NETã®éåºæ¬èšèªã¯FïŒ ã IronPython ã IronRuby ãPHPã§ãã ããããã¹ãŠã¯ãããçšåºŠãVSXã«åºã¥ããŠããŸãã
ããã«æ³šç®ãã䟡å€ããããŸããã¹ã¿ãžãªæ¡åŒµã«ã¯ãåé¢ã¢ãŒããšçµ±åã¢ãŒãã®2ã€ã®ããŒãžã§ã³ããããŸãã ããã§ã®éãã¯ãã¹ã¿ãžãªã³ã¢èªäœãšãã®APIãåžžã«å©çšå¯èœã§ããããšã§ãããéåžžã®ã¹ã¿ãžãªã«ååšããæ©èœã¯çµ±åã¢ãŒãã§ã®ã¿å©çšå¯èœã§ãïŒããšãã°ãsysharpãšvisual-basicãWebãããžã§ã¯ããããããçš®é¡ã®ãŠã£ã³ããŠãšããŒã«ïŒã å€ç«ããç¶æ ã§ã¯ãã·ã§ã«ãã·ã§ã«ã®ã¿ãååŸããŸãã
XNA Game Studio ã Microsoft Robotics Studio ã SQL Server Management Studio ã Microsoft Visual Studio Macrosã¯ãåé¢ãããã·ã§ã«ã«åºã¥ããŠé ã«æµ®ããã æåã®è£œåã§ãã ãŸããExpress-studiosã®å šã©ã€ã³ïŒVisual Basic 2008 Express EditionãVisual Web Developer 2008 Express EditionãVisual C ++ 2008 Express Editionã Visual CïŒ2008 Express Edition-åãã«ãŒããæã£ãŠãããšæããŸãã
ãšããã§ãHabréã«ã¯ãVSXã®äœ¿çšäŸã«é¢ããåºçç©ããããŸããã
- Project Navigator for Visual Studio ;
- Visual Studio-ãããã¬ãŒããžã¥ã¢ã©ã€ã¶ãŒã®ãããã°æ¯æŽ ã
- VS 2010ããã³.NET 4.0ã®ScottGuïŒVS 2010ã®ãããžã§ã¯ããã³ãã¬ãŒã ã
çµ±åã¢ãŒãã®æ¡åŒµæ©èœã¯ãéãšã¯ã¹ãã¬ã¹ããŒãžã§ã³ã§ã®ã¿äœ¿çšã§ããããšã«æ³šæããããšãéèŠã§ãã ã€ãŸããç¡æçã§ã¯æ¡åŒµæ©èœãã€ã³ã¹ããŒã«ããããšã¯äžå¯èœã§ãã ãããããã®çµ±åã¢ãŒãã䜿çšããŠãæ°ããããã°ã©ãã³ã°èšèªãè¿œå ã®éçºããŒã«ãäœæããŠå®è£ ããæ¢ã«ååŸããŠã€ã³ã¹ããŒã«ããã¹ã¿ãžãªã§äœ¿çšã§ããŸãã èšèªãšæè¡ã®äŸã¯ãã£ãšé«ãã£ãã
Visual Studio StandardãProfessionalããŸãã¯Team SystemããŒãžã§ã³ã®é«äŸ¡ãªã³ããŒãååŸããã«å®è¡ãããå Žåã¯ãç¹å®ã®ãšãã£ã¿ãŒãªã©ã®ã¹ã¿ã³ãã¢ãã³ã®è£œåãäœæããããã«äœ¿çšã§ããç¡æã®Visual Studioåé¢ã·ã§ã«ããããŸãã
VSXã®æ©èœ
- ãã¯ãïŒãã¯ãïŒã
- ã¢ãã€ã³
- ãããã³ã°ïŒçµ±åããã±ãŒãžïŒã
æ¡åŒµæ©èœã«æ»ããŸãã ãã¯ããšã¢ããªã³ã¯åžžã«äœ¿çšå¯èœã§ãããããã±ãŒãžãäœæããã«ã¯Visual Studio SDKãå¿ èŠã§ãã
VS SDKãæ倧éã«æŽ»çšããã«ã¯ããŸãVS 2008 SDK 1.0ãã€ã³ã¹ããŒã«ããŠããã VS 2008 SDK 1.1ãã€ã³ã¹ããŒã«ããããšããå§ãã ãŸã ã 1.1ã§ã¯ãäœããã®çç±ã§ãããžã§ã¯ãããŒã¹ããããŸãããããã«ã€ããŠã¯åŸã§èª¬æããŸãã
äžè¬ã«ãVS SDKãã€ã³ã¹ããŒã«ããåŸãã¢ããªã³ãšããã±ãŒãžãäœæãã Visual Studio 2008 ShellïŒåé¢ã¢ãŒãïŒSP1 -VS ShellããŒã¹ã®ãœãªã¥ãŒã·ã§ã³ãã€ã³ã¹ããŒã«ããåŸãå¯èœã«ãªããŸãã éé¢ãããã·ã§ã«ã¯10ãæã«ååšããŸãã
3ã€ã®ãªãã·ã§ã³VSXã®ã¿ãæè¡çã«å¶éãããŠããŸãã ãã®ãããããžã¥ã¢ã©ã€ã¶ãŒãããŒã«ãŠã£ã³ããŠããããžã§ã¯ããã³ãã¬ãŒãã MSBuildæ¡åŒµæ©èœã DSLããŒã«ãããã³åè¿°ã®VS Shell IsolatedããããŸãã
é çªã«ïŒ
- ãã¯ã ã ãããã䜿çšããŠãã¢ã¯ã·ã§ã³ãããã«ç¹°ãè¿ããŠèšé²ããããšãã§ããŸããã€ãŸããããã°ã©ã ã§ã¢ã¯ã·ã§ã³ãèªååã§ããŸãã ãã¯ãã®äœæã¯ãããžã¥ã¢ã«ããŒã·ãã¯ïŒVB.NETïŒã«å¶éãããŠããŸãã
- ã¢ããªã³ ã¢ãã€ã³ã¯åãªãã³ãŒãã§ã¯ãããŸããã ã¢ãã€ã³ã¯ãã³ã³ãã€ã«ãããCOMã³ã³ããŒãã³ãïŒéåžžã®.NETã¢ã»ã³ããªïŒãšããŠã·ã§ã«ã«çµ±åãããç°å¢ãšãã®APIã«ã»ãŒå®å šã«ã¢ã¯ã»ã¹ã§ããŸãã
- ããã±ãŒãž ã¢ããªã³ã®ããã«ã·ã§ã«ã«å®å šã«çµ±åã§ããŸãããããã«ç¬èªã®ã¿ã€ãã®ãããžã§ã¯ããäœæããæ°ããããã°ã©ãã³ã°èšèªãçµ±åããæ©èœãæäŸããŸãã
MPF
VSXã¯ãManaged Package FrameworkïŒMPFïŒã«åºã¥ããŠããŸãã ãããŒãžã³ãŒãã䜿çšããŠããã±ãŒãžãäœæã§ããŸãã MPFã«ã¯ãè€æ°ã®ããã±ãŒãžã€ã³ã¿ãŒãã§ã€ã¹ã®ã«ãã»ã«åãããå®è£ ãå«ãŸããŠãããããå°ãªãã³ãŒãã§ç¬èªã®ããã±ãŒãžãäœæã§ããŸãã
MPFåå空é
SDKãã€ã³ã¹ããŒã«ãããšã次ã®åå空éã®ãªã¹ãã䜿çšå¯èœã«ãªããŸãã
åå空é | 説æ |
Microsoft.VisualStudio | COMãšã©ãŒãã¹ã¿ãžãªå®æ°ã32ãŠã£ã³ããŠã¯ã€ã³ãæäœããããã®ã¯ã©ã¹ |
Microsoft.VisualStudio.Package | ã¹ã¿ãžãªãããžã§ã¯ããã³ãŒããšãã£ã¿ãŒãMSBuildã®ãããŒãžã³ãŒãã©ãã㌠|
Microsoft.VisualStudio.Package.Automation | ãªãŒãã¡ãŒã·ã§ã³ãªããžã§ã¯ãã®ã©ãã㌠|
Microsoft.VisualStudio.Shell | ç¶æ¿ã§ããã¡ã€ã³ã¹ã¿ãžãªãªããžã§ã¯ãã®å€ããå®è£ ããããŒã¹MPFã¯ã©ã¹ |
Microsoft.VisualStudio.Shell.Design | ãã¶ã€ããŒæ¡åŒµ |
Microsoft.VisualStudio.Shell.Design.Serialization | ã·ãªã¢ã«åæ¡åŒµæ©èœã®èšèš |
Microsoft.VisualStudio.Shell.Design.Serialization.CodeDom | ãã¶ã€ããŒåãã®CodeDOMæ¡åŒµæ©èœ |
Microsoft.VisualStudio.Shell.Flavor | ãããžã§ã¯ããµãã¿ã€ãã®ãµããŒã |
VSXtra
ãã®ããŒã«ãããïŒ VSXtra ïŒã®äœæè ã«ãããšãããã±ãŒãžã®éçºã¯ä»¥åããããã£ãšç°¡åã«ãªããŸããã å€ãã®ã©ãããŒãä»ã®ãã¿ãŒã³ãªã©ã䜿çšããŠã圌ã¯ã¹ã¿ãžãªã®COMã®æ§è³ªãšã.NETãä»ããŠCOMã§äœæ¥ããããã«å¿ èŠãªéçºè ã®ãçµ±å倱調çç¶æ ããé ãåªåãããŸããã
VSXtraã«ãã£ãŠè§£æ±ºãããåé¡ïŒ
- MPFã®äž»èŠãªã¹ã¿ãžãªãµãŒãã¹ã®äžå®å šãªã«ãã¬ããžã
- èšå€§ãªéã®è¿œå ã³ãŒãïŒå®éã®æ¡åŒµæ©èœãå®è£ ããããã«æ°åè¡ïŒãæžãå¿ èŠæ§ã
- æ代é ãã®ã¢ãããŒãã䜿çšããŠããžã§ããªãã¯ãšLINQã®æ¬ åŠã
ãã®è£œåã®äž»ãªã¿ã¹ã¯ã¯ãã¹ã¿ãžãªéçºããŒã ã«æ°ããææ°ã®MPFãäœæããããã«ããã·ã¥ããããšã§ãã ããŠããµã€ã1ã¯ãéçºè ãæ¯æŽããèè ã楜ããŸããããšã§ãã
Visual Studio 2010 SDK
Visual Studio 2010 SDKã«ã¯ãæ¡åŒµæ©èœã®éçºãç°¡çŽ åããããã€ãã®æ°ããèŠçŽ ãå«ãŸããŠããŸãã
- ãŠã£ã³ããŠãšã³ãã³ããäœæããããã®ãã³ãã¬ãŒãã
- ãšãã£ã¿ãŒæ¡åŒµãã³ãã¬ãŒãã®æ°ããã»ããã
- VSIXãããã§ã¹ããšVSIXã³ã³ãããäœæããããã®æ°ãããã«ãã¿ã¹ã¯ãVisualStudioã®ã£ã©ãªãŒã«ããŒãã§ããæ¡åŒµæ©èœãå ±æã§ããŸãã
- VSIXãããã§ã¹ããšãã£ã¿ãŒ
- VSIXã³ã³ããã§æ¢åã®æ¡åŒµãããžã§ã¯ããã©ããã§ãã空ã®VSIXãããžã§ã¯ãã
- DSLããŒã«ã¯SDKã®å€åŽã«ç§»åããã¹ã¿ãžãªèªäœã§å©çšã§ããããã«ãªããŸããã
- SDKã®äŸã¯ãªã³ã©ã€ã³ã§ã®ã¿å©çšã§ããŸãã
- SDKããã¥ã¡ã³ãã¯ãªã³ã©ã€ã³ã§ã®ã¿å ¥æå¯èœã§ãã
- æ¡åŒµæ©èœã®éçºããã»ã¹ã®æ¹åã
- æ¡åŒµçšã®è¿œå ãããžã§ã¯ããã³ãã¬ãŒããè¿œå ããŸãã
- æ¡åŒµæ©èœãäœæããã³ãããã°ããããã®è¿œå ããŒã«ã®äœæã
- 10çªç®ã®ã¹ã¿ãžãªçšã®æ¡åŒµæ©èœãäœæããè¿œå ã®äŸããããŸãã
- Managed Extensibility Frameworkãšçµã¿åãããŠããã±ãŒãžã䜿çšãã
- ããŒã¿ãã¶ã€ããŒã®æ©èœãæ¡åŒµããã
- ããŒãžã§ã³ç®¡çã·ã¹ãã ãšã®çµ±åã
- ãããã¬ãŒã®ã«ã¹ã¿ãã€ãºãŸãã¯æ°ãããããã¬ãŒã®äœæã
- ãã¹ãçšã®ããŒã«ã®äœæã
ããã±ãŒãžãšMEFã䜿çšããŠStudioã匷åãã
ã¹ã¿ãžãªãšãã£ã¿ãŒã¯ããããã³ã°ã«åºã¥ããŠäœæãããããã€ãã®MEFæ¡åŒµãè¿œå ãããŸããã ãšãã£ã¿ãŒã®æ©èœãæ¡åŒµããã«ã¯ããããã®æ¡åŒµæ©èœãèªåã§äœæã§ããŸãã
Visual Studio SDKã«ã¯ãCïŒãVisual BasicããŸãã¯Visual
è©³çŽ°ïŒ Visual Studio Integration SDKã®éå§ã Visual Studioæ¡åŒµæ©èœã®éçº ã
å€éšãœãŒã¹ãæäœããããã®ããŒã¿ãã¶ã€ããŒã®æ©èœã®æ¡åŒµ
ããŒã¿ãã¶ã€ããŒã®æ©èœïŒData Designer ExtensibilityãDDEXïŒãæ¡åŒµãããšãå€ãã®å€éšããŒã¿ãœãŒã¹ããã¶ã€ã³ã¢ãŒãã§æäœã§ããŸãã ãããã®ãœãŒã¹ã®éå±€ã¯ããµãŒããŒãšã¯ã¹ãããŒã©ãŒïŒãµãŒããŒãšã¯ã¹ãããŒã©ãŒïŒã«è¡šç€ºãããŸãã DDEXã䜿çšãããšãå€éšããŒã¿ãœãŒã¹ã«é¢é£ãã
DDEX SDKã¯ãç¬èªã®DDEXãããã€ããŒã®äœæã«åœ¹ç«ã€ããã¥ã¡ã³ããäŸãããã³ãã®ä»ã®æ å ±ãæäŸããŸãã
è¿œå æ å ±ïŒ Data Designer Extensibility Architecture ã Data Designer ExtensibilityïŒDDEXïŒSDK
ããŒãžã§ã³ç®¡çã·ã¹ãã ãšã®çµ±å
ã¹ã¿ãžãªã¯ã2çš®é¡ã®çµ±åããµããŒãããŠããŸãã察å¿ããapiïŒä»¥åã¯MSSCCI APIãšåŒã°ããŠãããœãŒã¹ç®¡ç
è¿œå æ å ±ïŒ ãœãŒã¹ç®¡ççµ±åã®æŠèŠ ã ãœãŒã¹ç®¡ç
ãããã¬ãŒã®ã«ã¹ã¿ãã€ãºãŸãã¯äœæ
SDKã䜿çšãããšãStudioã³ã³ããŒãã³ããã«ã¹ã¿ãã€ãºããŠãããã°ããããIDEã«çµ±åããç¬èªã®ã³ã³ããŒãã³ããäœæãããã§ããŸãã
ã¹ã¿ãžãªã§ã¯ããããã°ã¯ãããã°ãããã¢ããªã±ãŒã·ã§ã³ã®ããã»ã¹ã®å€åŽã§è¡ãããŸãã ããã§ããããã¬ãŒãšå¯Ÿè©±ããç¬èªã®ã³ã³ããŒãã³ããäœæã§ããŸããããããã°ãããã¢ããªã±ãŒã·ã§ã³ã«ã¯åœ±é¿ããŸããã
Visual Studioãããã°SDKã䜿çšããã«ã¯ã次ã®ããšãç解ããå¿ èŠããããŸãã
- ã¹ã¿ãžãªç°å¢èªäœïŒVisual Studio IDEïŒ;
-
C ++ ; - ATL COMã
ãã¹ãããŒã«ã®äœæ
ã¹ã¿ãžãªã«ã¯ãç°å¢ã®ä»ã®æ©èœãšç·å¯ã«çµ±åããããã¹ãããŒã«ãå«ãŸããŠããŸãã ãã®ããŒã«ãããã¯ãç¬èªã®ãã¹ããã¬ãŒã ã¯ãŒã¯ã ãã§ãªãããœãããŠã§ã¢ã©ã€ããµã€ã¯ã«ããŒã«ããããã¬ãŒã ã¯ãŒã¯ãšãé£æºããŸãã
ãããã®ããŒã«ã䜿çšãããšãæåãã¹ããšèªåãã¹ããäœæã管çãç·šéãå®è¡ããŠããã¹ãçµæãä¿åã§ããŸãã ç¬èªã®ã¿ã€ãã®ãã¹ããäœæããããšã¯å¯èœã§ãã
è¿œå æ å ±ïŒ ã¢ããªã±ãŒã·ã§ã³ã® ãã¹ããVisual Studio SDKã䜿çšãããã¹ãã®ã«ã¹ã¿ãã€ãº ã