Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Plugin app

  • Loading branch information...
commit 06ba3e0f43a2e84f015306d005058df052afc964 1 parent 5792bd4
@mikoskinen authored
Showing with 1,117 additions and 0 deletions.
  1. +11 −0 .gitignore
  2. BIN  app-with-plugin-support/lib/StructureMap.dll
  3. +66 −0 app-with-plugin-support/src/app-with-plugin-support.sln
  4. +7 −0 app-with-plugin-support/src/app-with-plugin-support/IPlugin.cs
  5. +87 −0 app-with-plugin-support/src/app-with-plugin-support/MainApplication.Designer.cs
  6. +76 −0 app-with-plugin-support/src/app-with-plugin-support/MainApplication.cs
  7. +120 −0 app-with-plugin-support/src/app-with-plugin-support/MainApplication.resx
  8. +16 −0 app-with-plugin-support/src/app-with-plugin-support/PluginRegistry.cs
  9. +34 −0 app-with-plugin-support/src/app-with-plugin-support/Program.cs
  10. +36 −0 app-with-plugin-support/src/app-with-plugin-support/Properties/AssemblyInfo.cs
  11. +63 −0 app-with-plugin-support/src/app-with-plugin-support/Properties/Resources.Designer.cs
  12. +117 −0 app-with-plugin-support/src/app-with-plugin-support/Properties/Resources.resx
  13. +26 −0 app-with-plugin-support/src/app-with-plugin-support/Properties/Settings.Designer.cs
  14. +7 −0 app-with-plugin-support/src/app-with-plugin-support/Properties/Settings.settings
  15. +106 −0 app-with-plugin-support/src/app-with-plugin-support/app-with-plugin-support.csproj
  16. +3 −0  app-with-plugin-support/src/app-with-plugin-support/app.config
  17. +1 −0  app-with-plugin-support/src/app-with-plugin-support/pluginarchive/empty.txt
  18. +1 −0  app-with-plugin-support/src/app-with-plugin-support/plugins/empty.txt
  19. +14 −0 app-with-plugin-support/src/plugin/MyPlugin.cs
  20. +36 −0 app-with-plugin-support/src/plugin/Properties/AssemblyInfo.cs
  21. +64 −0 app-with-plugin-support/src/plugin/plugin.csproj
  22. +13 −0 app-with-plugin-support/src/plugin2/MyPlugin.cs
  23. +36 −0 app-with-plugin-support/src/plugin2/Properties/AssemblyInfo.cs
  24. +64 −0 app-with-plugin-support/src/plugin2/plugin2.csproj
  25. +13 −0 app-with-plugin-support/src/plugin3/MyPlugin.cs
  26. +36 −0 app-with-plugin-support/src/plugin3/Properties/AssemblyInfo.cs
  27. +64 −0 app-with-plugin-support/src/plugin3/plugin3.csproj
View
11 .gitignore
@@ -0,0 +1,11 @@
+obj
+bin
+_ReSharper.*
+*.csproj.user
+*.resharper.user
+*.ReSharper.user
+*.resharper
+*.ReSharper
+*.suo
+*.cache
+~$*
View
BIN  app-with-plugin-support/lib/StructureMap.dll
Binary file not shown
View
66 app-with-plugin-support/src/app-with-plugin-support.sln
@@ -0,0 +1,66 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "app-with-plugin-support", "app-with-plugin-support\app-with-plugin-support.csproj", "{ACC9435F-9B28-4091-BCA5-101A85471BB5}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "plugin", "plugin\plugin.csproj", "{D5E8B273-8CC2-447C-A1D8-94288FEDB4B5}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "plugin2", "plugin2\plugin2.csproj", "{2F4257A4-5FEE-46E6-9A44-5BDA4DD5C1C0}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "plugin3", "plugin3\plugin3.csproj", "{26F8F1E3-FFFD-4C51-B5D6-918E17437DA8}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|Mixed Platforms = Debug|Mixed Platforms
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|Mixed Platforms = Release|Mixed Platforms
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {ACC9435F-9B28-4091-BCA5-101A85471BB5}.Debug|Any CPU.ActiveCfg = Debug|x86
+ {ACC9435F-9B28-4091-BCA5-101A85471BB5}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {ACC9435F-9B28-4091-BCA5-101A85471BB5}.Debug|Mixed Platforms.Build.0 = Debug|x86
+ {ACC9435F-9B28-4091-BCA5-101A85471BB5}.Debug|x86.ActiveCfg = Debug|x86
+ {ACC9435F-9B28-4091-BCA5-101A85471BB5}.Debug|x86.Build.0 = Debug|x86
+ {ACC9435F-9B28-4091-BCA5-101A85471BB5}.Release|Any CPU.ActiveCfg = Release|x86
+ {ACC9435F-9B28-4091-BCA5-101A85471BB5}.Release|Mixed Platforms.ActiveCfg = Release|x86
+ {ACC9435F-9B28-4091-BCA5-101A85471BB5}.Release|Mixed Platforms.Build.0 = Release|x86
+ {ACC9435F-9B28-4091-BCA5-101A85471BB5}.Release|x86.ActiveCfg = Release|x86
+ {ACC9435F-9B28-4091-BCA5-101A85471BB5}.Release|x86.Build.0 = Release|x86
+ {D5E8B273-8CC2-447C-A1D8-94288FEDB4B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D5E8B273-8CC2-447C-A1D8-94288FEDB4B5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D5E8B273-8CC2-447C-A1D8-94288FEDB4B5}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {D5E8B273-8CC2-447C-A1D8-94288FEDB4B5}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {D5E8B273-8CC2-447C-A1D8-94288FEDB4B5}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {D5E8B273-8CC2-447C-A1D8-94288FEDB4B5}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D5E8B273-8CC2-447C-A1D8-94288FEDB4B5}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D5E8B273-8CC2-447C-A1D8-94288FEDB4B5}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {D5E8B273-8CC2-447C-A1D8-94288FEDB4B5}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {D5E8B273-8CC2-447C-A1D8-94288FEDB4B5}.Release|x86.ActiveCfg = Release|Any CPU
+ {2F4257A4-5FEE-46E6-9A44-5BDA4DD5C1C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {2F4257A4-5FEE-46E6-9A44-5BDA4DD5C1C0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2F4257A4-5FEE-46E6-9A44-5BDA4DD5C1C0}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {2F4257A4-5FEE-46E6-9A44-5BDA4DD5C1C0}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {2F4257A4-5FEE-46E6-9A44-5BDA4DD5C1C0}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {2F4257A4-5FEE-46E6-9A44-5BDA4DD5C1C0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {2F4257A4-5FEE-46E6-9A44-5BDA4DD5C1C0}.Release|Any CPU.Build.0 = Release|Any CPU
+ {2F4257A4-5FEE-46E6-9A44-5BDA4DD5C1C0}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {2F4257A4-5FEE-46E6-9A44-5BDA4DD5C1C0}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {2F4257A4-5FEE-46E6-9A44-5BDA4DD5C1C0}.Release|x86.ActiveCfg = Release|Any CPU
+ {26F8F1E3-FFFD-4C51-B5D6-918E17437DA8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {26F8F1E3-FFFD-4C51-B5D6-918E17437DA8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {26F8F1E3-FFFD-4C51-B5D6-918E17437DA8}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {26F8F1E3-FFFD-4C51-B5D6-918E17437DA8}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {26F8F1E3-FFFD-4C51-B5D6-918E17437DA8}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {26F8F1E3-FFFD-4C51-B5D6-918E17437DA8}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {26F8F1E3-FFFD-4C51-B5D6-918E17437DA8}.Release|Any CPU.Build.0 = Release|Any CPU
+ {26F8F1E3-FFFD-4C51-B5D6-918E17437DA8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {26F8F1E3-FFFD-4C51-B5D6-918E17437DA8}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {26F8F1E3-FFFD-4C51-B5D6-918E17437DA8}.Release|x86.ActiveCfg = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
View
7 app-with-plugin-support/src/app-with-plugin-support/IPlugin.cs
@@ -0,0 +1,7 @@
+namespace app_with_plugin_support
+{
+ public interface IPlugin
+ {
+ void Run();
+ }
+}
View
87 app-with-plugin-support/src/app-with-plugin-support/MainApplication.Designer.cs
@@ -0,0 +1,87 @@
+namespace app_with_plugin_support
+{
+ partial class MainApplication
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.button1 = new System.Windows.Forms.Button();
+ this.button2 = new System.Windows.Forms.Button();
+ this.button3 = new System.Windows.Forms.Button();
+ this.SuspendLayout();
+ //
+ // button1
+ //
+ this.button1.Location = new System.Drawing.Point(119, 72);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(152, 23);
+ this.button1.TabIndex = 0;
+ this.button1.Text = "Run my features";
+ this.button1.UseVisualStyleBackColor = true;
+ this.button1.Click += new System.EventHandler(this.RunFeatures_Click);
+ //
+ // button2
+ //
+ this.button2.Location = new System.Drawing.Point(119, 122);
+ this.button2.Name = "button2";
+ this.button2.Size = new System.Drawing.Size(152, 23);
+ this.button2.TabIndex = 1;
+ this.button2.Text = "Update my features";
+ this.button2.UseVisualStyleBackColor = true;
+ this.button2.Click += new System.EventHandler(this.UpdateFeatures_Click);
+ //
+ // button3
+ //
+ this.button3.Location = new System.Drawing.Point(119, 166);
+ this.button3.Name = "button3";
+ this.button3.Size = new System.Drawing.Size(152, 23);
+ this.button3.TabIndex = 2;
+ this.button3.Text = "Add new features";
+ this.button3.UseVisualStyleBackColor = true;
+ this.button3.Click += new System.EventHandler(this.AddFeatures_Click);
+ //
+ // MainApplication
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(404, 260);
+ this.Controls.Add(this.button3);
+ this.Controls.Add(this.button2);
+ this.Controls.Add(this.button1);
+ this.Name = "MainApplication";
+ this.Text = "Application with plugin support";
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Button button1;
+ private System.Windows.Forms.Button button2;
+ private System.Windows.Forms.Button button3;
+ }
+}
+
View
76 app-with-plugin-support/src/app-with-plugin-support/MainApplication.cs
@@ -0,0 +1,76 @@
+using System.IO;
+using System.Windows.Forms;
+using StructureMap;
+
+namespace app_with_plugin_support
+{
+ public interface IMainApplication
+ {
+ void Start();
+ }
+
+ public partial class MainApplication : Form, IMainApplication
+ {
+ private readonly IContainer container;
+
+
+ public MainApplication(IContainer container)
+ {
+ this.container = container;
+ InitializeComponent();
+ }
+
+ public void Start()
+ {
+ this.ShowDialog();
+ }
+
+ private void RunFeatures_Click(object sender, System.EventArgs e)
+ {
+ var plugins = container.GetAllInstances<IPlugin>();
+ if (plugins == null)
+ return;
+
+ foreach (var plugin in plugins)
+ {
+ plugin.Run();
+ }
+ }
+
+ private void UpdateFeatures_Click(object sender, System.EventArgs e)
+ {
+ var appPath = Application.StartupPath;
+
+ var sourcePath = Path.Combine(appPath, @"pluginarchive\plugin.dll");
+ var destinationPath = Path.Combine(appPath, @"plugins\plugin.dll");
+
+ File.Copy(sourcePath, destinationPath, true);
+
+ ReloadPlugins();
+
+ }
+
+ private void AddFeatures_Click(object sender, System.EventArgs e)
+ {
+
+ var appPath = Application.StartupPath;
+
+ var sourcePath = Path.Combine(appPath, @"pluginarchive\plugin3.dll");
+ var destinationPath = Path.Combine(appPath, @"plugins\plugin2.dll");
+
+ File.Copy(sourcePath, destinationPath, true);
+
+ ReloadPlugins();
+
+ }
+
+ private void ReloadPlugins()
+ {
+ container.EjectAllInstancesOf<IPlugin>();
+
+ container.Configure(x =>
+ x.AddRegistry<PluginRegistry>()
+ );
+ }
+ }
+}
View
120 app-with-plugin-support/src/app-with-plugin-support/MainApplication.resx
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root>
View
16 app-with-plugin-support/src/app-with-plugin-support/PluginRegistry.cs
@@ -0,0 +1,16 @@
+using StructureMap.Configuration.DSL;
+
+namespace app_with_plugin_support
+{
+ public class PluginRegistry : Registry
+ {
+ public PluginRegistry()
+ {
+ Scan( x=>
+ {
+ x.AssembliesFromPathDynamically(@".\plugins");
+ x.AddAllTypesOf<IPlugin>();
+ });
+ }
+ }
+}
View
34 app-with-plugin-support/src/app-with-plugin-support/Program.cs
@@ -0,0 +1,34 @@
+using System;
+using StructureMap;
+
+namespace app_with_plugin_support
+{
+ static class Program
+ {
+ /// <summary>
+ /// The main entry point for the application.
+ /// </summary>
+ [STAThread]
+ static void Main()
+ {
+
+ var container = CreateContainer();
+
+ var mainApp = container.GetInstance<IMainApplication>();
+ mainApp.Start();
+
+ }
+
+ private static IContainer CreateContainer()
+ {
+ var container = new Container(x =>
+ {
+
+ x.AddRegistry<PluginRegistry>();
+ x.For<IMainApplication>().Use<MainApplication>();
+ });
+
+ return container;
+ }
+ }
+}
View
36 app-with-plugin-support/src/app-with-plugin-support/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 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("app-with-plugin-support")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("app-with-plugin-support")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2010")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("23b9f941-bbec-492c-b03d-48d03dc88a9a")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
View
63 app-with-plugin-support/src/app-with-plugin-support/Properties/Resources.Designer.cs
@@ -0,0 +1,63 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.1
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace app_with_plugin_support.Properties {
+ using System;
+
+
+ /// <summary>
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ /// </summary>
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ /// <summary>
+ /// Returns the cached ResourceManager instance used by this class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("app_with_plugin_support.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ /// <summary>
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+ }
+}
View
117 app-with-plugin-support/src/app-with-plugin-support/Properties/Resources.resx
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root>
View
26 app-with-plugin-support/src/app-with-plugin-support/Properties/Settings.Designer.cs
@@ -0,0 +1,26 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.1
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace app_with_plugin_support.Properties {
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default {
+ get {
+ return defaultInstance;
+ }
+ }
+ }
+}
View
7 app-with-plugin-support/src/app-with-plugin-support/Properties/Settings.settings
@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
+ <Profiles>
+ <Profile Name="(Default)" />
+ </Profiles>
+ <Settings />
+</SettingsFile>
View
106 app-with-plugin-support/src/app-with-plugin-support/app-with-plugin-support.csproj
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{ACC9435F-9B28-4091-BCA5-101A85471BB5}</ProjectGuid>
+ <OutputType>WinExe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>app_with_plugin_support</RootNamespace>
+ <AssemblyName>app-with-plugin-support</AssemblyName>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <TargetFrameworkProfile>
+ </TargetFrameworkProfile>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <PlatformTarget>x86</PlatformTarget>
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <PlatformTarget>x86</PlatformTarget>
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="log4net">
+ <HintPath>..\..\..\..\..\spikes\MvcApplication6\lib\log4net.dll</HintPath>
+ </Reference>
+ <Reference Include="StructureMap">
+ <HintPath>..\..\lib\StructureMap.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Deployment" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Windows.Forms" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="IPlugin.cs" />
+ <Compile Include="MainApplication.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="MainApplication.Designer.cs">
+ <DependentUpon>MainApplication.cs</DependentUpon>
+ </Compile>
+ <Compile Include="PluginRegistry.cs" />
+ <Compile Include="Program.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <EmbeddedResource Include="MainApplication.resx">
+ <DependentUpon>MainApplication.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Properties\Resources.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <Compile Include="Properties\Resources.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DependentUpon>Resources.resx</DependentUpon>
+ <DesignTime>True</DesignTime>
+ </Compile>
+ <None Include="app.config" />
+ <None Include="Properties\Settings.settings">
+ <Generator>SettingsSingleFileGenerator</Generator>
+ <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+ </None>
+ <Compile Include="Properties\Settings.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DependentUpon>Settings.settings</DependentUpon>
+ <DesignTimeSharedInput>True</DesignTimeSharedInput>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="pluginarchive\empty.txt">
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ </Content>
+ <Content Include="plugins\empty.txt">
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ </Content>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
View
3  app-with-plugin-support/src/app-with-plugin-support/app.config
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<configuration>
+<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
View
1  app-with-plugin-support/src/app-with-plugin-support/pluginarchive/empty.txt
@@ -0,0 +1 @@
+
View
1  app-with-plugin-support/src/app-with-plugin-support/plugins/empty.txt
@@ -0,0 +1 @@
+
View
14 app-with-plugin-support/src/plugin/MyPlugin.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Windows.Forms;
+using app_with_plugin_support;
+
+namespace plugin
+{
+ public class MyPlugin : IPlugin
+ {
+ public void Run()
+ {
+ MessageBox.Show("Hello from plugin.", "Version 1.0");
+ }
+ }
+}
View
36 app-with-plugin-support/src/plugin/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 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("plugin")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("plugin")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2010")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("61dea2ac-13f8-4205-adaf-7df27a0d7513")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
View
64 app-with-plugin-support/src/plugin/plugin.csproj
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{D5E8B273-8CC2-447C-A1D8-94288FEDB4B5}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>plugin</RootNamespace>
+ <AssemblyName>plugin</AssemblyName>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Windows.Forms" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="MyPlugin.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\app-with-plugin-support\app-with-plugin-support.csproj">
+ <Project>{ACC9435F-9B28-4091-BCA5-101A85471BB5}</Project>
+ <Name>app-with-plugin-support</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <PropertyGroup>
+ <PostBuildEvent>copy $(TargetPath) $(SolutionDir)\app-with-plugin-support\bin\debug\plugins\</PostBuildEvent>
+ </PropertyGroup>
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
View
13 app-with-plugin-support/src/plugin2/MyPlugin.cs
@@ -0,0 +1,13 @@
+using System.Windows.Forms;
+using app_with_plugin_support;
+
+namespace plugin2
+{
+ public class MyPlugin : IPlugin
+ {
+ public void Run()
+ {
+ MessageBox.Show("Hello from plugin, I've been updated.", "Version 2.0");
+ }
+ }
+}
View
36 app-with-plugin-support/src/plugin2/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 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("plugin2")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("plugin2")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2010")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("5bd855f5-40b3-44de-b30a-19d49d2d3731")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
View
64 app-with-plugin-support/src/plugin2/plugin2.csproj
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{2F4257A4-5FEE-46E6-9A44-5BDA4DD5C1C0}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>plugin2</RootNamespace>
+ <AssemblyName>plugin</AssemblyName>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Windows.Forms" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="MyPlugin.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\app-with-plugin-support\app-with-plugin-support.csproj">
+ <Project>{ACC9435F-9B28-4091-BCA5-101A85471BB5}</Project>
+ <Name>app-with-plugin-support</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <PropertyGroup>
+ <PostBuildEvent>copy $(TargetPath) $(SolutionDir)\app-with-plugin-support\bin\debug\pluginarchive\</PostBuildEvent>
+ </PropertyGroup>
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
View
13 app-with-plugin-support/src/plugin3/MyPlugin.cs
@@ -0,0 +1,13 @@
+using System.Windows.Forms;
+using app_with_plugin_support;
+
+namespace plugin3
+{
+ public class MyPlugin : IPlugin
+ {
+ public void Run()
+ {
+ MessageBox.Show("Hello, I'm a new feature.", "Version 1.0");
+ }
+ }
+}
View
36 app-with-plugin-support/src/plugin3/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 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("plugin3")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("plugin3")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2010")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("4f8fc05a-a0ac-41f7-b069-02f2a51c9b62")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
View
64 app-with-plugin-support/src/plugin3/plugin3.csproj
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{26F8F1E3-FFFD-4C51-B5D6-918E17437DA8}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>plugin3</RootNamespace>
+ <AssemblyName>plugin3</AssemblyName>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Windows.Forms" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="MyPlugin.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\app-with-plugin-support\app-with-plugin-support.csproj">
+ <Project>{ACC9435F-9B28-4091-BCA5-101A85471BB5}</Project>
+ <Name>app-with-plugin-support</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <PropertyGroup>
+ <PostBuildEvent>copy $(TargetPath) $(SolutionDir)\app-with-plugin-support\bin\debug\pluginarchive\</PostBuildEvent>
+ </PropertyGroup>
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
Please sign in to comment.
Something went wrong with that request. Please try again.