diff --git a/VsDingExtension/AssemblyInfo.cs b/VsDingExtension/AssemblyInfo.cs new file mode 100644 index 0000000..9f505ee --- /dev/null +++ b/VsDingExtension/AssemblyInfo.cs @@ -0,0 +1,51 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +// +[assembly: AssemblyTitle("")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Revision +// Build Number +// +// You can specify all the value or you can default the Revision and Build Numbers +// by using the '*' as shown below: + +[assembly: AssemblyVersion("1.0.*")] + +// +// In order to sign your assembly you must specify a key to use. Refer to the +// Microsoft .NET Framework documentation for more information on assembly signing. +// +// Use the attributes below to control which key is used for signing. +// +// Notes: +// (*) If no key is specified - the assembly cannot be signed. +// (*) KeyName refers to a key that has been installed in the Crypto Service +// Provider (CSP) on your machine. +// (*) If the key file and a key name attributes are both specified, the +// following processing occurs: +// (1) If the KeyName can be found in the CSP - that key is used. +// (2) If the KeyName does not exist and the KeyFile does exist, the key +// in the file is installed into the CSP and used. +// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework +// documentation for more information on this. +// +[assembly: AssemblyDelaySign(false)] +[assembly: AssemblyKeyFile("")] +[assembly: AssemblyKeyName("")] diff --git a/VsDingExtension/Connect.cs b/VsDingExtension/Connect.cs new file mode 100644 index 0000000..908b1cc --- /dev/null +++ b/VsDingExtension/Connect.cs @@ -0,0 +1,65 @@ +using System; +using Extensibility; +using EnvDTE; +using EnvDTE80; +namespace VsDingExtension +{ + /// The object for implementing an Add-in. + /// + public class Connect : IDTExtensibility2 + { + /// Implements the constructor for the Add-in object. Place your initialization code within this method. + public Connect() + { + } + + /// Implements the OnConnection method of the IDTExtensibility2 interface. Receives notification that the Add-in is being loaded. + /// Root object of the host application. + /// Describes how the Add-in is being loaded. + /// Object representing this Add-in. + /// + public void OnConnection(object application, ext_ConnectMode connectMode, object addInInst, ref Array custom) + { + applicationObject = (DTE2)application; + addInInstance = (AddIn)addInInst; + } + + /// Implements the OnDisconnection method of the IDTExtensibility2 interface. Receives notification that the Add-in is being unloaded. + /// Describes how the Add-in is being unloaded. + /// Array of parameters that are host application specific. + /// + public void OnDisconnection(ext_DisconnectMode disconnectMode, ref Array custom) + { + } + + /// Implements the OnAddInsUpdate method of the IDTExtensibility2 interface. Receives notification when the collection of Add-ins has changed. + /// Array of parameters that are host application specific. + /// + public void OnAddInsUpdate(ref Array custom) + { + } + + /// Implements the OnStartupComplete method of the IDTExtensibility2 interface. Receives notification that the host application has completed loading. + /// Array of parameters that are host application specific. + /// + public void OnStartupComplete(ref Array custom) + { + applicationObject.Events.BuildEvents.OnBuildDone += BuildEventsOnOnBuildDone; + } + + private void BuildEventsOnOnBuildDone(vsBuildScope scope, vsBuildAction action) + { + System.Media.SystemSounds.Asterisk.Play(); + } + + /// Implements the OnBeginShutdown method of the IDTExtensibility2 interface. Receives notification that the host application is being unloaded. + /// Array of parameters that are host application specific. + /// + public void OnBeginShutdown(ref Array custom) + { + } + + private DTE2 applicationObject; + private AddIn addInInstance; + } +} \ No newline at end of file diff --git a/VsDingExtension/VsDingExtension.AddIn b/VsDingExtension/VsDingExtension.AddIn new file mode 100644 index 0000000..55ebe90 Binary files /dev/null and b/VsDingExtension/VsDingExtension.AddIn differ diff --git a/VsDingExtension/VsDingExtension.csproj b/VsDingExtension/VsDingExtension.csproj new file mode 100644 index 0000000..2a50c07 --- /dev/null +++ b/VsDingExtension/VsDingExtension.csproj @@ -0,0 +1,139 @@ + + + + Debug + AnyCPU + 8.0.30424 + 2.0 + {54C786E5-FD14-4036-92AE-E9F25B71534B} + Library + + + false + VsDingExtension + .\bin\ + v4.5 + + + + true + false + .\bin\Debug\ + false + DEBUG;TRACE + 4 + false + false + VsDingExtension.xml + + + false + true + .\bin\Release\ + false + TRACE + 4 + false + false + VsDingExtension.xml + + + VsDingExtension + + + + False + + + + + + + + + + Code + + + Code + + + + + {80CC9F66-E7D8-4DDD-85B6-D9E6CD0E93E2} + 8 + 0 + 0 + primary + False + False + + + {26AD1324-4B7C-44BC-84F8-B86AED45729F} + 10 + 0 + 0 + primary + False + False + + + {1A31287A-4D7D-413E-8E32-3B374931BD89} + 8 + 0 + 0 + primary + False + False + + + {2CE2370E-D744-4936-A090-3FFFE667B0E1} + 9 + 0 + 0 + primary + False + False + + + {1CBA492E-7263-47BB-87FE-639000619B15} + 8 + 0 + 0 + primary + False + False + + + {00020430-0000-0000-C000-000000000046} + 2 + 0 + 0 + primary + False + False + + + + + VsDingExtension - For Testing.AddIn + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/VsDingExtension/VsDingExtension.xml b/VsDingExtension/VsDingExtension.xml new file mode 100644 index 0000000..ffa1530 --- /dev/null +++ b/VsDingExtension/VsDingExtension.xml @@ -0,0 +1,43 @@ + + + + VsDingExtension + + + + The object for implementing an Add-in. + + + + Implements the constructor for the Add-in object. Place your initialization code within this method. + + + Implements the OnConnection method of the IDTExtensibility2 interface. Receives notification that the Add-in is being loaded. + Root object of the host application. + Describes how the Add-in is being loaded. + Object representing this Add-in. + + + + Implements the OnDisconnection method of the IDTExtensibility2 interface. Receives notification that the Add-in is being unloaded. + Describes how the Add-in is being unloaded. + Array of parameters that are host application specific. + + + + Implements the OnAddInsUpdate method of the IDTExtensibility2 interface. Receives notification when the collection of Add-ins has changed. + Array of parameters that are host application specific. + + + + Implements the OnStartupComplete method of the IDTExtensibility2 interface. Receives notification that the host application has completed loading. + Array of parameters that are host application specific. + + + + Implements the OnBeginShutdown method of the IDTExtensibility2 interface. Receives notification that the host application is being unloaded. + Array of parameters that are host application specific. + + + +