├── SafeRootProjectWizard ├── key.snk ├── RootWizard.cs ├── ChildWizard.cs ├── Properties │ └── AssemblyInfo.cs └── SafeRootProjectWizard.csproj ├── SolutionTemplateGenerator ├── ico.ico ├── Resources │ ├── stg.png │ ├── debug-run-icon.png │ ├── __Template_large.png │ ├── __Template_small.png │ ├── MIT.txt │ └── [Content_Types].xml ├── packages.config ├── MainWindow.xaml.cs ├── Properties │ ├── Settings.settings │ ├── Settings.Designer.cs │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── Views │ ├── Config.xaml.cs │ └── Config.xaml ├── App.xaml ├── Core │ ├── XmlSchema │ │ ├── VSTemplateTemplateDataLocationField.cs │ │ ├── VSTemplateTemplateDataRequiredFrameworkVersion.cs │ │ ├── ItemsChoiceType.cs │ │ ├── VSTemplateTemplateContentReferencesReference.cs │ │ ├── VsixAssembly.cs │ │ ├── VsixIdentifierIsolatedShell.cs │ │ ├── VsixIdentifierSupportedFrameworkRuntimeEdition.cs │ │ ├── VSTemplateTemplateContentCustomParameter.cs │ │ ├── NameDescriptionIcon.cs │ │ ├── VSTemplateTemplateContentReferences.cs │ │ ├── ProjectTemplateLink.cs │ │ ├── VSTemplateWizardData.cs │ │ ├── VsixReference.cs │ │ ├── VSTemplateTemplateContentProjectCollection.cs │ │ ├── VsixCustomExtension.cs │ │ ├── VsixIdentifierVisualStudio.cs │ │ ├── VSTemplateTemplateContentProjectItem.cs │ │ ├── SolutionFolder.cs │ │ ├── VsixContent.cs │ │ ├── Folder.cs │ │ ├── VSTemplateWizardExtension.cs │ │ ├── Vsix.cs │ │ ├── VSTemplateTemplateContentProject.cs │ │ ├── VSTemplateTemplateContent.cs │ │ ├── ProjectItem.cs │ │ ├── VSTemplate.cs │ │ ├── VsixIdentifier.cs │ │ └── VSTemplateTemplateData.cs │ ├── Utils │ │ ├── ResourceFile.cs │ │ ├── KnownProjectTypeGuid.cs │ │ ├── Serializer.cs │ │ └── IoExt.cs │ ├── ProjectSettings.cs │ ├── TemplateGeneratorFactory.cs │ ├── Preprocessor │ │ ├── ModifyFactory.cs │ │ ├── ModifyProjectFile.cs │ │ └── ModifyCodeFile.cs │ ├── ManifestCreator │ │ ├── SolutionFileParser.cs │ │ ├── Project.cs │ │ ├── SolutionVSTemplateCreator.cs │ │ ├── ProjectVSTemplateCreator.cs │ │ └── VsixManifestCreator.cs │ └── ZipSolution.cs ├── App.xaml.cs ├── BusyIndicator │ ├── VisualStates.BusyIndicator.cs │ └── BusyIndicator.cs ├── MVVM │ ├── DelegateCommand.cs │ ├── ViewModelBase.cs │ ├── FolderBrowserDialogBehavior.cs │ └── OpenFileDialogBoxBehavior.cs ├── MainWindow.xaml ├── ViewModels │ └── MainWindowViewModel.cs ├── Models │ └── OptionsGui.cs ├── SolutionTemplateGenerator.csproj └── Themes │ └── Generic.xaml ├── README.md ├── .github └── issue_template.md ├── SolutionTemplateGenerator.sln ├── .gitattributes ├── .gitignore └── LICENSE.md /SafeRootProjectWizard/key.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VahidN/Solution-Template-Generator/HEAD/SafeRootProjectWizard/key.snk -------------------------------------------------------------------------------- /SolutionTemplateGenerator/ico.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VahidN/Solution-Template-Generator/HEAD/SolutionTemplateGenerator/ico.ico -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Resources/stg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VahidN/Solution-Template-Generator/HEAD/SolutionTemplateGenerator/Resources/stg.png -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Resources/debug-run-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VahidN/Solution-Template-Generator/HEAD/SolutionTemplateGenerator/Resources/debug-run-icon.png -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Resources/__Template_large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VahidN/Solution-Template-Generator/HEAD/SolutionTemplateGenerator/Resources/__Template_large.png -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Resources/__Template_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VahidN/Solution-Template-Generator/HEAD/SolutionTemplateGenerator/Resources/__Template_small.png -------------------------------------------------------------------------------- /SolutionTemplateGenerator/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Solution template generator, gets a .SLN file containing multiple projects and then converts it to a .VSIX file. 2 | 3 | ![SolutionTemplateGenerator](/SolutionTemplateGenerator/Resources/stg.png) -------------------------------------------------------------------------------- /SolutionTemplateGenerator/MainWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace SolutionTemplateGenerator 3 | { 4 | public partial class MainWindow 5 | { 6 | public MainWindow() 7 | { 8 | InitializeComponent(); 9 | } 10 | } 11 | } -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Views/Config.xaml.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace SolutionTemplateGenerator.Views 3 | { 4 | public partial class Config 5 | { 6 | public Config() 7 | { 8 | InitializeComponent(); 9 | } 10 | } 11 | } -------------------------------------------------------------------------------- /.github/issue_template.md: -------------------------------------------------------------------------------- 1 | # Summary of the issue 2 | 3 | 4 | 5 | ## Environment 6 | 7 | ``` 8 | The in-use version: 9 | Operating system: 10 | IDE: (e.g. Visual Studio 2015) 11 | ``` 12 | 13 | ## Example code/Steps to reproduce: 14 | 15 | ``` 16 | paste your core code 17 | ``` 18 | 19 | ## Output: 20 | 21 | ``` 22 | Exception message: 23 | Full Stack trace: 24 | ``` 25 | 26 | -------------------------------------------------------------------------------- /SolutionTemplateGenerator/App.xaml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Core/XmlSchema/VSTemplateTemplateDataLocationField.cs: -------------------------------------------------------------------------------- 1 | using System.CodeDom.Compiler; 2 | using System.Xml.Serialization; 3 | 4 | namespace SolutionTemplateGenerator.Core.XmlSchema 5 | { 6 | [GeneratedCode("System.Xml", "2.0.50727.4927"), XmlType(AnonymousType = true, Namespace = "http://schemas.microsoft.com/developer/vstemplate/2005")] 7 | public enum VSTemplateTemplateDataLocationField 8 | { 9 | Enabled, 10 | Disabled, 11 | Hidden 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Core/XmlSchema/VSTemplateTemplateDataRequiredFrameworkVersion.cs: -------------------------------------------------------------------------------- 1 | using System.CodeDom.Compiler; 2 | using System.Xml.Serialization; 3 | 4 | namespace SolutionTemplateGenerator.Core.XmlSchema 5 | { 6 | [GeneratedCode("System.Xml", "2.0.50727.4927"), XmlType(AnonymousType = true, Namespace = "http://schemas.microsoft.com/developer/vstemplate/2005")] 7 | public enum VSTemplateTemplateDataRequiredFrameworkVersion 8 | { 9 | Item20, 10 | Item30, 11 | Item35 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Core/XmlSchema/ItemsChoiceType.cs: -------------------------------------------------------------------------------- 1 | using System.CodeDom.Compiler; 2 | using System.Xml.Serialization; 3 | 4 | namespace SolutionTemplateGenerator.Core.XmlSchema 5 | { 6 | [GeneratedCode("System.Xml", "2.0.50727.4927"), XmlType(Namespace = "http://schemas.microsoft.com/developer/vsx-schema/2010", IncludeInSchema = false)] 7 | public enum ItemsChoiceType 8 | { 9 | Assembly, 10 | CustomExtension, 11 | ItemTemplate, 12 | MefComponent, 13 | ProjectTemplate, 14 | ToolboxControl, 15 | VsPackage 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Core/XmlSchema/VSTemplateTemplateContentReferencesReference.cs: -------------------------------------------------------------------------------- 1 | using System.CodeDom.Compiler; 2 | using System.Diagnostics; 3 | using System.Xml.Serialization; 4 | 5 | namespace SolutionTemplateGenerator.Core.XmlSchema 6 | { 7 | [GeneratedCode("System.Xml", "2.0.50727.4927"), DebuggerStepThrough, XmlType(AnonymousType = true, Namespace = "http://schemas.microsoft.com/developer/vstemplate/2005")] 8 | public class VSTemplateTemplateContentReferencesReference 9 | { 10 | public string Assembly 11 | { 12 | get; 13 | set; 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Core/XmlSchema/VsixAssembly.cs: -------------------------------------------------------------------------------- 1 | using System.CodeDom.Compiler; 2 | using System.Xml; 3 | using System.Xml.Serialization; 4 | 5 | namespace SolutionTemplateGenerator.Core.XmlSchema 6 | { 7 | [GeneratedCode("System.Xml", "2.0.50727.4927"), XmlType(AnonymousType = true, Namespace = "http://schemas.microsoft.com/developer/vsx-schema/2010")] 8 | public class VsixAssembly 9 | { 10 | [XmlAttribute] 11 | public string AssemblyName 12 | { 13 | get; 14 | set; 15 | } 16 | 17 | [XmlText] 18 | public string Value 19 | { 20 | get; 21 | set; 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Core/XmlSchema/VsixIdentifierIsolatedShell.cs: -------------------------------------------------------------------------------- 1 | using System.CodeDom.Compiler; 2 | using System.Xml; 3 | using System.Xml.Serialization; 4 | 5 | namespace SolutionTemplateGenerator.Core.XmlSchema 6 | { 7 | [GeneratedCode("System.Xml", "2.0.50727.4927"), XmlType(AnonymousType = true, Namespace = "http://schemas.microsoft.com/developer/vsx-schema/2010")] 8 | public class VsixIdentifierIsolatedShell 9 | { 10 | [XmlAttribute] 11 | public string Version 12 | { 13 | get; 14 | set; 15 | } 16 | 17 | [XmlText] 18 | public string Value 19 | { 20 | get; 21 | set; 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Core/XmlSchema/VsixIdentifierSupportedFrameworkRuntimeEdition.cs: -------------------------------------------------------------------------------- 1 | using System.CodeDom.Compiler; 2 | using System.Xml; 3 | using System.Xml.Serialization; 4 | 5 | namespace SolutionTemplateGenerator.Core.XmlSchema 6 | { 7 | [GeneratedCode("System.Xml", "2.0.50727.4927"), XmlType(AnonymousType = true, Namespace = "http://schemas.microsoft.com/developer/vsx-schema/2010")] 8 | public class VsixIdentifierSupportedFrameworkRuntimeEdition 9 | { 10 | [XmlAttribute] 11 | public string MinVersion 12 | { 13 | get; 14 | set; 15 | } 16 | 17 | [XmlAttribute] 18 | public string MaxVersion 19 | { 20 | get; 21 | set; 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Core/XmlSchema/VSTemplateTemplateContentCustomParameter.cs: -------------------------------------------------------------------------------- 1 | using System.CodeDom.Compiler; 2 | using System.Diagnostics; 3 | using System.Xml; 4 | using System.Xml.Serialization; 5 | 6 | namespace SolutionTemplateGenerator.Core.XmlSchema 7 | { 8 | [GeneratedCode("System.Xml", "2.0.50727.4927"), DebuggerStepThrough, XmlType(AnonymousType = true, Namespace = "http://schemas.microsoft.com/developer/vstemplate/2005")] 9 | public class VSTemplateTemplateContentCustomParameter 10 | { 11 | [XmlAttribute] 12 | public string Name 13 | { 14 | get; 15 | set; 16 | } 17 | 18 | [XmlAttribute] 19 | public string Value 20 | { 21 | get; 22 | set; 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Core/XmlSchema/NameDescriptionIcon.cs: -------------------------------------------------------------------------------- 1 | using System.CodeDom.Compiler; 2 | using System.Diagnostics; 3 | using System.Xml; 4 | using System.Xml.Serialization; 5 | 6 | namespace SolutionTemplateGenerator.Core.XmlSchema 7 | { 8 | [GeneratedCode("System.Xml", "2.0.50727.4927"), DebuggerStepThrough, XmlType(Namespace = "http://schemas.microsoft.com/developer/vstemplate/2005")] 9 | public class NameDescriptionIcon 10 | { 11 | [XmlAttribute] 12 | public string Package 13 | { 14 | get; 15 | set; 16 | } 17 | 18 | [XmlAttribute] 19 | public string ID 20 | { 21 | get; 22 | set; 23 | } 24 | 25 | [XmlText] 26 | public string Value 27 | { 28 | get; 29 | set; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Core/Utils/ResourceFile.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | 4 | namespace SolutionTemplateGenerator.Core.Utils 5 | { 6 | public static class ResourceFile 7 | { 8 | public static byte[] GetInputFile(string filename) 9 | { 10 | var thisAssembly = Assembly.GetExecutingAssembly(); 11 | using (var stream = thisAssembly.GetManifestResourceStream(filename)) 12 | { 13 | if (stream == null) 14 | throw new ArgumentException("Resource NotFound: " + filename); 15 | 16 | var bytes = new byte[stream.Length]; 17 | stream.Read(bytes, 0, bytes.Length); 18 | return bytes; 19 | } 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Core/XmlSchema/VSTemplateTemplateContentReferences.cs: -------------------------------------------------------------------------------- 1 | using System.CodeDom.Compiler; 2 | using System.Diagnostics; 3 | using System.Xml.Serialization; 4 | 5 | namespace SolutionTemplateGenerator.Core.XmlSchema 6 | { 7 | [GeneratedCode("System.Xml", "2.0.50727.4927"), DebuggerStepThrough, XmlType(AnonymousType = true, Namespace = "http://schemas.microsoft.com/developer/vstemplate/2005")] 8 | public class VSTemplateTemplateContentReferences 9 | { 10 | public VSTemplateTemplateContentReferencesReference Reference 11 | { 12 | get; 13 | set; 14 | } 15 | 16 | public VSTemplateTemplateContentReferences() 17 | { 18 | if (this.Reference == null) 19 | { 20 | this.Reference = new VSTemplateTemplateContentReferencesReference(); 21 | } 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Core/XmlSchema/ProjectTemplateLink.cs: -------------------------------------------------------------------------------- 1 | using System.CodeDom.Compiler; 2 | using System.Diagnostics; 3 | using System.Xml; 4 | using System.Xml.Serialization; 5 | 6 | namespace SolutionTemplateGenerator.Core.XmlSchema 7 | { 8 | [GeneratedCode("System.Xml", "2.0.50727.4927"), DebuggerStepThrough, XmlRoot(Namespace = "http://schemas.microsoft.com/developer/vstemplate/2005", IsNullable = false), XmlType(AnonymousType = true, Namespace = "http://schemas.microsoft.com/developer/vstemplate/2005")] 9 | public class ProjectTemplateLink 10 | { 11 | [XmlAttribute] 12 | public string ProjectName 13 | { 14 | get; 15 | set; 16 | } 17 | 18 | [XmlText] 19 | public string Value 20 | { 21 | get; 22 | set; 23 | } 24 | 25 | [XmlAttribute] 26 | public bool ReplaceParameters { set; get; } 27 | } 28 | } -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Core/ProjectSettings.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System.Windows.Forms; 3 | using SolutionTemplateGenerator.Core.Utils; 4 | using SolutionTemplateGenerator.Models; 5 | 6 | namespace SolutionTemplateGenerator.Core 7 | { 8 | public static class ProjectSettings 9 | { 10 | private static readonly string XmlPath = Path.Combine(Application.StartupPath, "settings.xml"); 11 | 12 | public static void SaveSettings(OptionsGui data) 13 | { 14 | var xml = Serializer.Serialize(data); 15 | File.WriteAllText(XmlPath, xml); 16 | } 17 | 18 | public static OptionsGui LoadSettings() 19 | { 20 | if (!File.Exists(XmlPath)) 21 | return new OptionsGui(); 22 | 23 | var xml = File.ReadAllText(XmlPath); 24 | return Serializer.Deserialize(xml); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Core/XmlSchema/VSTemplateWizardData.cs: -------------------------------------------------------------------------------- 1 | using System.CodeDom.Compiler; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Xml; 5 | using System.Xml.Serialization; 6 | 7 | namespace SolutionTemplateGenerator.Core.XmlSchema 8 | { 9 | [GeneratedCode("System.Xml", "2.0.50727.4927"), DebuggerStepThrough, XmlType(AnonymousType = true, Namespace = "http://schemas.microsoft.com/developer/vstemplate/2005")] 10 | public class VSTemplateWizardData 11 | { 12 | [XmlAttribute] 13 | public string Name 14 | { 15 | get; 16 | set; 17 | } 18 | 19 | [XmlAnyElement] 20 | public List Any 21 | { 22 | get; 23 | set; 24 | } 25 | 26 | public VSTemplateWizardData() 27 | { 28 | if (this.Any == null) 29 | { 30 | this.Any = new List(); 31 | } 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Core/Utils/KnownProjectTypeGuid.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionTemplateGenerator.Core.Utils 2 | { 3 | using System.Collections.Generic; 4 | 5 | public static class KnownProjectTypeGuid 6 | { 7 | public static readonly IDictionary ProjectTypes = new Dictionary 8 | { 9 | { "{F184B08F-C81C-45F6-A57F-5ABD9991F28F}", "VisualBasic" }, 10 | { "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}", "CSharp" }, 11 | { "{E6FDF86B-F3D1-11D4-8576-0002A516ECE8}", "JSharp" }, 12 | { "{F2A71F9B-5D33-465A-A702-920D77279786}", "FSharp" }, 13 | { "{2150E333-8FDC-42A3-9474-1A3956D46DE8}", "SolutionFolder" }, 14 | { "{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}", "VisualC" }, 15 | { "{54435603-DBB4-11D2-8724-00A0C9A8B90C}", "Setup" }, 16 | { "{E24C65DC-7377-472B-9ABA-BC803B73C61A}", "WebProject" } 17 | }; 18 | } 19 | } -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Core/XmlSchema/VsixReference.cs: -------------------------------------------------------------------------------- 1 | using System.CodeDom.Compiler; 2 | using System.Xml; 3 | using System.Xml.Serialization; 4 | 5 | namespace SolutionTemplateGenerator.Core.XmlSchema 6 | { 7 | [GeneratedCode("System.Xml", "2.0.50727.4927"), XmlType(AnonymousType = true, Namespace = "http://schemas.microsoft.com/developer/vsx-schema/2010")] 8 | public class VsixReference 9 | { 10 | public string Name 11 | { 12 | get; 13 | set; 14 | } 15 | 16 | public string MoreInfoUrl 17 | { 18 | get; 19 | set; 20 | } 21 | 22 | public string VsixPath 23 | { 24 | get; 25 | set; 26 | } 27 | 28 | [XmlAttribute] 29 | public string Id 30 | { 31 | get; 32 | set; 33 | } 34 | 35 | [XmlAttribute] 36 | public string MinVersion 37 | { 38 | get; 39 | set; 40 | } 41 | 42 | [XmlAttribute] 43 | public string MaxVersion 44 | { 45 | get; 46 | set; 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Core/XmlSchema/VSTemplateTemplateContentProjectCollection.cs: -------------------------------------------------------------------------------- 1 | using System.CodeDom.Compiler; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Xml; 5 | using System.Xml.Serialization; 6 | 7 | namespace SolutionTemplateGenerator.Core.XmlSchema 8 | { 9 | [GeneratedCode("System.Xml", "2.0.50727.4927"), DebuggerStepThrough, XmlType(AnonymousType = true, Namespace = "http://schemas.microsoft.com/developer/vstemplate/2005")] 10 | public class VSTemplateTemplateContentProjectCollection 11 | { 12 | [XmlElement("ProjectTemplateLink", typeof(ProjectTemplateLink)), XmlElement("SolutionFolder", typeof(SolutionFolder))] 13 | public List Items 14 | { 15 | get; 16 | set; 17 | } 18 | 19 | public VSTemplateTemplateContentProjectCollection() 20 | { 21 | if (this.Items == null) 22 | { 23 | this.Items = new List(); 24 | } 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Core/XmlSchema/VsixCustomExtension.cs: -------------------------------------------------------------------------------- 1 | using System.CodeDom.Compiler; 2 | using System.Collections.Generic; 3 | using System.Xml; 4 | using System.Xml.Serialization; 5 | 6 | namespace SolutionTemplateGenerator.Core.XmlSchema 7 | { 8 | [GeneratedCode("System.Xml", "2.0.50727.4927"), XmlType(AnonymousType = true, Namespace = "http://schemas.microsoft.com/developer/vsx-schema/2010")] 9 | public class VsixCustomExtension 10 | { 11 | [XmlAttribute] 12 | public string Type 13 | { 14 | get; 15 | set; 16 | } 17 | 18 | [XmlText] 19 | public string Value 20 | { 21 | get; 22 | set; 23 | } 24 | 25 | [XmlAnyAttribute] 26 | public List AnyAttr 27 | { 28 | get; 29 | set; 30 | } 31 | 32 | public VsixCustomExtension() 33 | { 34 | if (this.AnyAttr == null) 35 | { 36 | this.AnyAttr = new List(); 37 | } 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /SolutionTemplateGenerator/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows; 3 | using System.Windows.Threading; 4 | 5 | namespace SolutionTemplateGenerator 6 | { 7 | public partial class App 8 | { 9 | public App() 10 | { 11 | this.DispatcherUnhandledException += appDispatcherUnhandledException; 12 | AppDomain.CurrentDomain.UnhandledException += currentDomainUnhandledException; 13 | } 14 | 15 | void currentDomainUnhandledException(object sender, UnhandledExceptionEventArgs e) 16 | { 17 | MessageBox.Show(((Exception)e.ExceptionObject).Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error); 18 | } 19 | 20 | private static void appDispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e) 21 | { 22 | MessageBox.Show(e.Exception.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error); 23 | e.Handled = true; 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Core/XmlSchema/VsixIdentifierVisualStudio.cs: -------------------------------------------------------------------------------- 1 | using System.CodeDom.Compiler; 2 | using System.Collections.Generic; 3 | using System.Xml; 4 | using System.Xml.Serialization; 5 | 6 | namespace SolutionTemplateGenerator.Core.XmlSchema 7 | { 8 | [GeneratedCode("System.Xml", "2.0.50727.4927"), XmlType(AnonymousType = true, Namespace = "http://schemas.microsoft.com/developer/vsx-schema/2010")] 9 | public class VsixIdentifierVisualStudio 10 | { 11 | [XmlAttribute] 12 | public string Version 13 | { 14 | get; 15 | set; 16 | } 17 | 18 | [XmlElement("Edition")] 19 | public List Edition 20 | { 21 | get; 22 | set; 23 | } 24 | 25 | public VsixIdentifierVisualStudio() 26 | { 27 | if (this.Edition == null) 28 | { 29 | this.Edition = new List(); 30 | } 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Core/XmlSchema/VSTemplateTemplateContentProjectItem.cs: -------------------------------------------------------------------------------- 1 | using System.CodeDom.Compiler; 2 | using System.Diagnostics; 3 | using System.Xml; 4 | using System.Xml.Serialization; 5 | 6 | namespace SolutionTemplateGenerator.Core.XmlSchema 7 | { 8 | [GeneratedCode("System.Xml", "2.0.50727.4927"), DebuggerStepThrough, XmlType(AnonymousType = true, Namespace = "http://schemas.microsoft.com/developer/vstemplate/2005")] 9 | public class VSTemplateTemplateContentProjectItem 10 | { 11 | [XmlAttribute] 12 | public string SubType 13 | { 14 | get; 15 | set; 16 | } 17 | 18 | [XmlAttribute] 19 | public bool ReplaceParameters 20 | { 21 | get; 22 | set; 23 | } 24 | 25 | [XmlIgnore] 26 | public bool ReplaceParametersSpecified 27 | { 28 | get; 29 | set; 30 | } 31 | 32 | [XmlAttribute] 33 | public string TargetFileName 34 | { 35 | get; 36 | set; 37 | } 38 | 39 | [XmlText] 40 | public string Value 41 | { 42 | get; 43 | set; 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Resources/MIT.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 3 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 4 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Core/XmlSchema/SolutionFolder.cs: -------------------------------------------------------------------------------- 1 | using System.CodeDom.Compiler; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Xml; 5 | using System.Xml.Serialization; 6 | 7 | namespace SolutionTemplateGenerator.Core.XmlSchema 8 | { 9 | [GeneratedCode("System.Xml", "2.0.50727.4927"), DebuggerStepThrough, XmlRoot(Namespace = "http://schemas.microsoft.com/developer/vstemplate/2005", IsNullable = false), XmlType(AnonymousType = true, Namespace = "http://schemas.microsoft.com/developer/vstemplate/2005")] 10 | public class SolutionFolder 11 | { 12 | [XmlAttribute] 13 | public string Name 14 | { 15 | get; 16 | set; 17 | } 18 | 19 | [XmlElement("ProjectTemplateLink", typeof(ProjectTemplateLink)), XmlElement("SolutionFolder", typeof(SolutionFolder))] 20 | public List Items { get; set; } 21 | 22 | public SolutionFolder() 23 | { 24 | if (this.Items == null) 25 | { 26 | this.Items = new List(); 27 | } 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Core/XmlSchema/VsixContent.cs: -------------------------------------------------------------------------------- 1 | using System.CodeDom.Compiler; 2 | using System.Xml; 3 | using System.Xml.Serialization; 4 | 5 | namespace SolutionTemplateGenerator.Core.XmlSchema 6 | { 7 | [GeneratedCode("System.Xml", "2.0.50727.4927"), XmlType(AnonymousType = true, Namespace = "http://schemas.microsoft.com/developer/vsx-schema/2010")] 8 | public class VsixContent 9 | { 10 | [XmlChoiceIdentifier("ItemsElementName"), XmlElement("CustomExtension", typeof(VsixCustomExtension)), XmlElement("ItemTemplate", typeof(string)), XmlElement("Assembly", typeof(VsixAssembly)), XmlElement("MefComponent", typeof(string)), XmlElement("ToolboxControl", typeof(string)), XmlElement("ProjectTemplate", typeof(string)), XmlElement("VsPackage", typeof(string))] 11 | public object[] Items 12 | { 13 | get; 14 | set; 15 | } 16 | 17 | [XmlElement("ItemsElementName"), XmlIgnore] 18 | public ItemsChoiceType[] ItemsElementName 19 | { 20 | get; 21 | set; 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Core/XmlSchema/Folder.cs: -------------------------------------------------------------------------------- 1 | using System.CodeDom.Compiler; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Xml.Serialization; 5 | 6 | namespace SolutionTemplateGenerator.Core.XmlSchema 7 | { 8 | [GeneratedCode("System.Xml", "2.0.50727.4927"), DebuggerStepThrough, XmlRoot(Namespace = "http://schemas.microsoft.com/developer/vstemplate/2005", IsNullable = false), XmlType(AnonymousType = true, Namespace = "http://schemas.microsoft.com/developer/vstemplate/2005")] 9 | public class Folder 10 | { 11 | [XmlAttribute] 12 | public string Name 13 | { 14 | get; 15 | set; 16 | } 17 | 18 | [XmlAttribute] 19 | public string TargetFolderName 20 | { 21 | get; 22 | set; 23 | } 24 | 25 | [XmlElement("ProjectItem", typeof(ProjectItem)), XmlElement("Folder", typeof(Folder))] 26 | public List Items { get; set; } 27 | 28 | public Folder() 29 | { 30 | if (this.Items == null) 31 | { 32 | this.Items = new List(); 33 | } 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Core/XmlSchema/VSTemplateWizardExtension.cs: -------------------------------------------------------------------------------- 1 | using System.CodeDom.Compiler; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Xml; 5 | using System.Xml.Serialization; 6 | 7 | namespace SolutionTemplateGenerator.Core.XmlSchema 8 | { 9 | [GeneratedCode("System.Xml", "2.0.50727.4927"), DebuggerStepThrough, XmlType(AnonymousType = true, Namespace = "http://schemas.microsoft.com/developer/vstemplate/2005")] 10 | public class VSTemplateWizardExtension 11 | { 12 | [XmlElement("Assembly", Type = typeof(string))] 13 | public List Assembly 14 | { 15 | get; 16 | set; 17 | } 18 | 19 | [XmlElement("FullClassName", Type = typeof(string))] 20 | public List FullClassName 21 | { 22 | get; 23 | set; 24 | } 25 | 26 | public VSTemplateWizardExtension() 27 | { 28 | if (this.FullClassName == null) 29 | { 30 | this.FullClassName = new List(); 31 | } 32 | if (this.Assembly == null) 33 | { 34 | this.Assembly = new List(); 35 | } 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /SolutionTemplateGenerator/BusyIndicator/VisualStates.BusyIndicator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Microsoft.Windows.Controls 4 | { 5 | internal static partial class VisualStates 6 | { 7 | /// 8 | /// Busyness group name. 9 | /// 10 | public const string GroupBusyStatus = "BusyStatusStates"; 11 | 12 | /// 13 | /// Busy state for BusyIndicator. 14 | /// 15 | public const string StateBusy = "Busy"; 16 | 17 | /// 18 | /// Idle state for BusyIndicator. 19 | /// 20 | public const string StateIdle = "Idle"; 21 | 22 | /// 23 | /// BusyDisplay group. 24 | /// 25 | public const string GroupVisibility = "VisibilityStates"; 26 | 27 | /// 28 | /// Visible state name for BusyIndicator. 29 | /// 30 | public const string StateVisible = "Visible"; 31 | 32 | /// 33 | /// Hidden state name for BusyIndicator. 34 | /// 35 | public const string StateHidden = "Hidden"; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Core/Utils/Serializer.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionTemplateGenerator.Core.Utils 2 | { 3 | using System.IO; 4 | using System.Xml.Serialization; 5 | using System.Xml; 6 | 7 | public static class Serializer 8 | { 9 | public static string Serialize(T type) 10 | { 11 | var serializer = new XmlSerializer(type.GetType()); 12 | using (var stream = new MemoryStream()) 13 | { 14 | serializer.Serialize(stream, type); 15 | stream.Seek(0, SeekOrigin.Begin); 16 | using (var reader = new StreamReader(stream)) 17 | { 18 | return reader.ReadToEnd(); 19 | } 20 | } 21 | } 22 | 23 | public static T Deserialize(string xml) 24 | { 25 | using (var input = new StringReader(xml)) 26 | { 27 | using (var xmlReader = new XmlTextReader(input)) 28 | { 29 | var serializer = new XmlSerializer(typeof(T)); 30 | return (T)serializer.Deserialize(xmlReader); 31 | } 32 | } 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /SolutionTemplateGenerator/MVVM/DelegateCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Input; 3 | 4 | namespace SolutionTemplateGenerator.MVVM 5 | { 6 | public class DelegateCommand : ICommand 7 | { 8 | readonly Func _canExecute; 9 | readonly Action _executeAction; 10 | 11 | public DelegateCommand(Action executeAction, Func canExecute = null) 12 | { 13 | if (executeAction == null) 14 | throw new ArgumentNullException("executeAction"); 15 | 16 | _executeAction = executeAction; 17 | _canExecute = canExecute; 18 | } 19 | 20 | public event EventHandler CanExecuteChanged 21 | { 22 | add { if (_canExecute != null) CommandManager.RequerySuggested += value; } 23 | remove { if (_canExecute != null) CommandManager.RequerySuggested -= value; } 24 | } 25 | 26 | public bool CanExecute(object parameter) 27 | { 28 | return _canExecute == null || _canExecute((T)parameter); 29 | } 30 | 31 | public void Execute(object parameter) 32 | { 33 | _executeAction((T)parameter); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Core/Utils/IoExt.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace SolutionTemplateGenerator.Core.Utils 4 | { 5 | using System.IO; 6 | 7 | public static class IoExt 8 | { 9 | public static string GetFileName(this string path) 10 | { 11 | var name = Path.GetFileName(path); 12 | if(string.IsNullOrWhiteSpace(name)) 13 | throw new InvalidOperationException(string.Format("Couldn't extract name of the `{0}`", path)); 14 | 15 | return name; 16 | } 17 | 18 | public static string GetDirectoryName(this string path) 19 | { 20 | var name = Path.GetDirectoryName(path); 21 | if (string.IsNullOrWhiteSpace(name)) 22 | throw new InvalidOperationException(string.Format("Couldn't extract DirectoryName of the `{0}`", path)); 23 | 24 | return name; 25 | } 26 | 27 | public static string GetExtension(this string path) 28 | { 29 | var name = Path.GetExtension(path); 30 | if (string.IsNullOrWhiteSpace(name)) 31 | { 32 | name = string.Empty; 33 | } 34 | 35 | return name; 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.237 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace SolutionTemplateGenerator.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Core/TemplateGeneratorFactory.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | using System.IO; 3 | using System.Linq; 4 | using SolutionTemplateGenerator.Models; 5 | 6 | namespace SolutionTemplateGenerator.Core 7 | { 8 | using SolutionTemplateGenerator.Core.ManifestCreator; 9 | 10 | public static class TemplateGeneratorFactory 11 | { 12 | public static void Start(OptionsGui data) 13 | { 14 | var projects = SolutionFileParser.GetSolutionProjects(data.SolutionPath); 15 | if (!projects.Any()) 16 | return; 17 | 18 | if (!Directory.Exists(data.OutputFolder)) 19 | Directory.CreateDirectory(data.OutputFolder); 20 | 21 | new ZipSolution 22 | { 23 | Comment = "Created by SolutionTemplateGenerator", 24 | IncludeSubfolders = true, 25 | OptionsGuiData = data, 26 | OutPathname = Path.Combine(data.OutputFolder, data.ProductName + ".zip"), 27 | NumberOfProjects = projects.Count, 28 | ProjectFiles = projects.Select(x => x.FullPath).ToList() 29 | }.ZipFolder(); 30 | 31 | Process.Start(data.OutputFolder); 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /SolutionTemplateGenerator/MVVM/ViewModelBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel; 3 | using System.Linq.Expressions; 4 | 5 | namespace SolutionTemplateGenerator.MVVM 6 | { 7 | public class ViewModelBase : INotifyPropertyChanged 8 | { 9 | public event PropertyChangedEventHandler PropertyChanged; 10 | 11 | protected void RaisePropertyChanged(Expression> expression) 12 | { 13 | MemberExpression memberExpression = null; 14 | if (expression.Body.NodeType == ExpressionType.Convert) 15 | { 16 | var body = (UnaryExpression)expression.Body; 17 | memberExpression = body.Operand as MemberExpression; 18 | } 19 | else if (expression.Body.NodeType == ExpressionType.MemberAccess) 20 | { 21 | memberExpression = expression.Body as MemberExpression; 22 | } 23 | 24 | if (memberExpression == null) 25 | throw new ArgumentException("Not a property or field", "expression"); 26 | 27 | var handler = PropertyChanged; 28 | if (handler == null) return; 29 | handler(this, new PropertyChangedEventArgs(memberExpression.Member.Name)); 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Core/XmlSchema/Vsix.cs: -------------------------------------------------------------------------------- 1 | using System.CodeDom.Compiler; 2 | using System.Collections.Generic; 3 | using System.Xml; 4 | using System.Xml.Serialization; 5 | 6 | namespace SolutionTemplateGenerator.Core.XmlSchema 7 | { 8 | [GeneratedCode("System.Xml", "2.0.50727.4927"), XmlRoot(Namespace = "http://schemas.microsoft.com/developer/vsx-schema/2010", IsNullable = false), XmlType(AnonymousType = true, Namespace = "http://schemas.microsoft.com/developer/vsx-schema/2010")] 9 | public class Vsix 10 | { 11 | public VsixIdentifier Identifier 12 | { 13 | get; 14 | set; 15 | } 16 | 17 | [XmlArrayItem("Reference", IsNullable = false)] 18 | public List References 19 | { 20 | get; 21 | set; 22 | } 23 | 24 | public VsixContent Content 25 | { 26 | get; 27 | set; 28 | } 29 | 30 | [XmlAttribute] 31 | public string Version 32 | { 33 | get; 34 | set; 35 | } 36 | 37 | public Vsix() 38 | { 39 | if (this.Content == null) 40 | { 41 | this.Content = new VsixContent(); 42 | } 43 | if (this.References == null) 44 | { 45 | this.References = new List(); 46 | } 47 | if (this.Identifier == null) 48 | { 49 | this.Identifier = new VsixIdentifier(); 50 | } 51 | } 52 | } 53 | } -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Core/XmlSchema/VSTemplateTemplateContentProject.cs: -------------------------------------------------------------------------------- 1 | using System.CodeDom.Compiler; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Xml; 5 | using System.Xml.Serialization; 6 | 7 | namespace SolutionTemplateGenerator.Core.XmlSchema 8 | { 9 | [GeneratedCode("System.Xml", "2.0.50727.4927"), DebuggerStepThrough, XmlType(AnonymousType = true, Namespace = "http://schemas.microsoft.com/developer/vstemplate/2005")] 10 | public class VSTemplateTemplateContentProject 11 | { 12 | [XmlAttribute] 13 | public string File 14 | { 15 | get; 16 | set; 17 | } 18 | 19 | [XmlAttribute] 20 | public string TargetFileName 21 | { 22 | get; 23 | set; 24 | } 25 | 26 | [XmlAttribute] 27 | public bool ReplaceParameters 28 | { 29 | get; 30 | set; 31 | } 32 | 33 | [XmlAttribute] 34 | public bool ReplaceParametersSpecified 35 | { 36 | get; 37 | set; 38 | } 39 | 40 | [XmlElement("Folder", typeof(Folder)), XmlElement("ProjectItem", typeof(ProjectItem))] 41 | public List Items 42 | { 43 | get; 44 | set; 45 | } 46 | 47 | public VSTemplateTemplateContentProject() 48 | { 49 | if (this.Items == null) 50 | { 51 | this.Items = new List(); 52 | } 53 | } 54 | } 55 | } -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Resources/[Content_Types].xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /SafeRootProjectWizard/RootWizard.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using EnvDTE; 3 | using Microsoft.VisualStudio.TemplateWizard; 4 | using System; 5 | 6 | namespace SafeRootProjectWizard 7 | { 8 | public class RootWizard : IWizard 9 | { 10 | public static Dictionary GlobalDictionary = new Dictionary(); 11 | 12 | public void RunStarted( 13 | object automationObject, 14 | Dictionary replacementsDictionary, 15 | WizardRunKind runKind, 16 | object[] customParams) 17 | { 18 | string value; 19 | if (replacementsDictionary.TryGetValue("$safeprojectname$", out value)) 20 | { 21 | GlobalDictionary["$saferootprojectname$"] = value; 22 | replacementsDictionary.Add("$saferootprojectname$", value); 23 | } 24 | } 25 | 26 | public void RunFinished() 27 | { 28 | } 29 | 30 | public void BeforeOpeningFile(ProjectItem projectItem) 31 | { 32 | } 33 | 34 | public void ProjectFinishedGenerating(Project project) 35 | { 36 | } 37 | 38 | public bool ShouldAddProjectItem(string filePath) 39 | { 40 | return true; 41 | } 42 | 43 | public void ProjectItemFinishedGenerating(ProjectItem projectItem) 44 | { 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Core/XmlSchema/VSTemplateTemplateContent.cs: -------------------------------------------------------------------------------- 1 | using System.CodeDom.Compiler; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Xml; 5 | using System.Xml.Serialization; 6 | 7 | namespace SolutionTemplateGenerator.Core.XmlSchema 8 | { 9 | [GeneratedCode("System.Xml", "2.0.50727.4927"), DebuggerStepThrough, XmlType(AnonymousType = true, Namespace = "http://schemas.microsoft.com/developer/vstemplate/2005")] 10 | public class VSTemplateTemplateContent 11 | { 12 | [XmlElement("ProjectCollection", typeof(VSTemplateTemplateContentProjectCollection)), XmlElement("ProjectItem", typeof(VSTemplateTemplateContentProjectItem)), XmlElement("Project", typeof(VSTemplateTemplateContentProject)), XmlElement("References", typeof(VSTemplateTemplateContentReferences))] 13 | public List Items 14 | { 15 | get; 16 | set; 17 | } 18 | 19 | [XmlArrayItem("CustomParameter", IsNullable = false)] 20 | public List CustomParameters 21 | { 22 | get; 23 | set; 24 | } 25 | 26 | public VSTemplateTemplateContent() 27 | { 28 | if (this.CustomParameters == null) 29 | { 30 | this.CustomParameters = new List(); 31 | } 32 | if (this.Items == null) 33 | { 34 | this.Items = new List(); 35 | } 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Core/Preprocessor/ModifyFactory.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionTemplateGenerator.Core.Preprocessor 2 | { 3 | using System.IO; 4 | 5 | using SolutionTemplateGenerator.Core.Utils; 6 | 7 | public static class ModifyFactory 8 | { 9 | public static bool IsCodeFile(string path) 10 | { 11 | switch (path.GetExtension().ToLower()) 12 | { 13 | case ".cs": 14 | case ".vb": 15 | case ".xaml": 16 | case ".aspx": 17 | case ".asax": 18 | case ".master": 19 | case ".cshtml": 20 | case ".vbhtml": 21 | return true; 22 | } 23 | 24 | return false; 25 | } 26 | 27 | public static bool IsProjectFile(string path) 28 | { 29 | switch (path.GetExtension().ToLower()) 30 | { 31 | case ".csproj": 32 | case ".vbproj": 33 | return true; 34 | } 35 | 36 | return false; 37 | } 38 | 39 | public static byte[] ProcessFile(string path, string defaultNamespace) 40 | { 41 | if (IsCodeFile(path)) 42 | return ModifyCodeFile.Start(path, defaultNamespace); 43 | 44 | if (IsProjectFile(path)) 45 | return ModifyProjectFile.Start(path, defaultNamespace); 46 | 47 | return File.ReadAllBytes(path); 48 | } 49 | } 50 | } -------------------------------------------------------------------------------- /SafeRootProjectWizard/ChildWizard.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using EnvDTE; 3 | using Microsoft.VisualStudio.TemplateWizard; 4 | 5 | namespace SafeRootProjectWizard 6 | { 7 | public class ChildWizard : IWizard 8 | { 9 | public void RunStarted(object automationObject, 10 | Dictionary replacementsDictionary, 11 | WizardRunKind runKind, 12 | object[] customParams) 13 | { 14 | string value; 15 | if (RootWizard.GlobalDictionary.TryGetValue("$saferootprojectname$", out value)) 16 | { 17 | replacementsDictionary.Add("$saferootprojectname$", value); 18 | } 19 | else 20 | { 21 | if (replacementsDictionary.TryGetValue("$safeprojectname$", out value)) 22 | { 23 | replacementsDictionary.Add("$saferootprojectname$", value); 24 | } 25 | } 26 | } 27 | 28 | public void RunFinished() 29 | { 30 | } 31 | 32 | public void BeforeOpeningFile(ProjectItem projectItem) 33 | { 34 | } 35 | 36 | public void ProjectFinishedGenerating(Project project) 37 | { 38 | } 39 | 40 | public bool ShouldAddProjectItem(string filePath) 41 | { 42 | return true; 43 | } 44 | 45 | public void ProjectItemFinishedGenerating(ProjectItem projectItem) 46 | { 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /SafeRootProjectWizard/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("SafeRootProjectWizard")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("SafeRootProjectWizard")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("20909a9f-7be1-4239-a3b6-368ea53649b9")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.4.0.0")] 36 | [assembly: AssemblyFileVersion("1.4.0.0")] 37 | -------------------------------------------------------------------------------- /SolutionTemplateGenerator/MainWindow.xaml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Core/XmlSchema/ProjectItem.cs: -------------------------------------------------------------------------------- 1 | using System.CodeDom.Compiler; 2 | using System.Diagnostics; 3 | using System.Xml; 4 | using System.Xml.Serialization; 5 | 6 | namespace SolutionTemplateGenerator.Core.XmlSchema 7 | { 8 | [GeneratedCode("System.Xml", "2.0.50727.4927"), DebuggerStepThrough, XmlRoot(Namespace = "http://schemas.microsoft.com/developer/vstemplate/2005", IsNullable = false), XmlType(AnonymousType = true, Namespace = "http://schemas.microsoft.com/developer/vstemplate/2005")] 9 | public class ProjectItem 10 | { 11 | [XmlAttribute] 12 | public string TargetFileName 13 | { 14 | get; 15 | set; 16 | } 17 | 18 | [XmlAttribute] 19 | public bool ReplaceParameters 20 | { 21 | get; 22 | set; 23 | } 24 | 25 | [XmlAttribute] 26 | public bool ReplaceParametersSpecified 27 | { 28 | get; 29 | set; 30 | } 31 | 32 | [XmlAttribute] 33 | public bool OpenInEditor 34 | { 35 | get; 36 | set; 37 | } 38 | 39 | [XmlIgnore] 40 | public bool OpenInEditorSpecified 41 | { 42 | get; 43 | set; 44 | } 45 | 46 | [XmlAttribute] 47 | public int OpenOrder 48 | { 49 | get; 50 | set; 51 | } 52 | 53 | [XmlIgnore] 54 | public bool OpenOrderSpecified 55 | { 56 | get; 57 | set; 58 | } 59 | 60 | [XmlAttribute] 61 | public bool OpenInWebBrowser 62 | { 63 | get; 64 | set; 65 | } 66 | 67 | [XmlIgnore] 68 | public bool OpenInWebBrowserSpecified 69 | { 70 | get; 71 | set; 72 | } 73 | 74 | [XmlAttribute] 75 | public bool OpenInHelpBrowser 76 | { 77 | get; 78 | set; 79 | } 80 | 81 | [XmlIgnore] 82 | public bool OpenInHelpBrowserSpecified 83 | { 84 | get; 85 | set; 86 | } 87 | 88 | [XmlText] 89 | public string Value 90 | { 91 | get; 92 | set; 93 | } 94 | } 95 | } -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Core/ManifestCreator/SolutionFileParser.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionTemplateGenerator.Core.ManifestCreator 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using System.IO; 6 | using System.Text.RegularExpressions; 7 | 8 | public static class SolutionFileParser 9 | { 10 | #region Fields (2) 11 | 12 | private const string Pattern = "^Project\\(\"(?.*)\"\\)\\s*=\\s*\"(?.*)\"\\s*,\\s*\"(?.*)\"\\s*,\\s*\"(?.*)\"$"; 13 | private static readonly Regex ProjectRegex = new Regex(Pattern, RegexOptions.Compiled); 14 | 15 | #endregion Fields 16 | 17 | #region Methods (1) 18 | 19 | // Public Methods (1)  20 | 21 | public static IList GetSolutionProjects(string path) 22 | { 23 | var results = new List(); 24 | 25 | var lines = File.ReadAllLines(path); 26 | foreach (var line in lines) 27 | { 28 | if (!line.StartsWith("Project(", StringComparison.InvariantCultureIgnoreCase)) 29 | continue; 30 | 31 | var match = ProjectRegex.Match(line); 32 | if (!match.Success) 33 | continue; 34 | 35 | results.Add(new Project 36 | { 37 | ProjectGuid = match.Groups["PROJECTGUID"].Value.Trim(), 38 | ProjectName = match.Groups["PROJECTNAME"].Value.Trim(), 39 | ProjectTypeGuid = match.Groups["PROJECTTYPEGUID"].Value.Trim(), 40 | RelativePath = match.Groups["RELATIVEPATH"].Value.Trim(), 41 | SolutionFilePath = path 42 | }); 43 | } 44 | 45 | return results; 46 | } 47 | 48 | #endregion Methods 49 | } 50 | } -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Core/XmlSchema/VSTemplate.cs: -------------------------------------------------------------------------------- 1 | using System.CodeDom.Compiler; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Xml; 5 | using System.Xml.Serialization; 6 | 7 | //Note: Don't change the order of properties here, otherwise vs.net won't recognize it!! 8 | namespace SolutionTemplateGenerator.Core.XmlSchema 9 | { 10 | [GeneratedCode("System.Xml", "2.0.50727.4927"), DebuggerStepThrough, XmlRoot(Namespace = "http://schemas.microsoft.com/developer/vstemplate/2005", IsNullable = false), XmlType(AnonymousType = true, Namespace = "http://schemas.microsoft.com/developer/vstemplate/2005")] 11 | public class VSTemplate 12 | { 13 | public VSTemplateTemplateData TemplateData 14 | { 15 | get; 16 | set; 17 | } 18 | 19 | public VSTemplateTemplateContent TemplateContent 20 | { 21 | get; 22 | set; 23 | } 24 | 25 | [XmlAttribute] 26 | public string Type 27 | { 28 | get; 29 | set; 30 | } 31 | 32 | [XmlAttribute] 33 | public string Version 34 | { 35 | get; 36 | set; 37 | } 38 | 39 | [XmlElement("WizardExtension")] 40 | public List WizardExtension 41 | { 42 | get; 43 | set; 44 | } 45 | 46 | [XmlElement("WizardData")] 47 | public List WizardData 48 | { 49 | get; 50 | set; 51 | } 52 | 53 | public VSTemplate() 54 | { 55 | if (this.WizardData == null) 56 | { 57 | this.WizardData = new List(); 58 | } 59 | if (this.WizardExtension == null) 60 | { 61 | this.WizardExtension = new List(); 62 | } 63 | if (this.TemplateContent == null) 64 | { 65 | this.TemplateContent = new VSTemplateTemplateContent(); 66 | } 67 | if (this.TemplateData == null) 68 | { 69 | this.TemplateData = new VSTemplateTemplateData(); 70 | } 71 | } 72 | } 73 | } -------------------------------------------------------------------------------- /SolutionTemplateGenerator.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SolutionTemplateGenerator", "SolutionTemplateGenerator\SolutionTemplateGenerator.csproj", "{D78BC10B-AF9E-403C-949E-9070690A630E}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SafeRootProjectWizard", "SafeRootProjectWizard\SafeRootProjectWizard.csproj", "{15539E15-F581-48FD-8E2E-2C8D5EEAEBF1}" 9 | EndProject 10 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C6B3FC6E-FBA4-4C90-899D-6368B219B97D}" 11 | ProjectSection(SolutionItems) = preProject 12 | LICENSE.md = LICENSE.md 13 | README.md = README.md 14 | EndProjectSection 15 | EndProject 16 | Global 17 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 18 | Debug|Any CPU = Debug|Any CPU 19 | Release|Any CPU = Release|Any CPU 20 | EndGlobalSection 21 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 22 | {D78BC10B-AF9E-403C-949E-9070690A630E}.Debug|Any CPU.ActiveCfg = Release|Any CPU 23 | {D78BC10B-AF9E-403C-949E-9070690A630E}.Debug|Any CPU.Build.0 = Release|Any CPU 24 | {D78BC10B-AF9E-403C-949E-9070690A630E}.Release|Any CPU.ActiveCfg = Release|Any CPU 25 | {D78BC10B-AF9E-403C-949E-9070690A630E}.Release|Any CPU.Build.0 = Release|Any CPU 26 | {15539E15-F581-48FD-8E2E-2C8D5EEAEBF1}.Debug|Any CPU.ActiveCfg = Release|Any CPU 27 | {15539E15-F581-48FD-8E2E-2C8D5EEAEBF1}.Debug|Any CPU.Build.0 = Release|Any CPU 28 | {15539E15-F581-48FD-8E2E-2C8D5EEAEBF1}.Release|Any CPU.ActiveCfg = Release|Any CPU 29 | {15539E15-F581-48FD-8E2E-2C8D5EEAEBF1}.Release|Any CPU.Build.0 = Release|Any CPU 30 | EndGlobalSection 31 | GlobalSection(SolutionProperties) = preSolution 32 | HideSolutionNode = FALSE 33 | EndGlobalSection 34 | GlobalSection(ExtensibilityGlobals) = postSolution 35 | VisualSVNWorkingCopyRoot = . 36 | EndGlobalSection 37 | EndGlobal 38 | -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Core/ManifestCreator/Project.cs: -------------------------------------------------------------------------------- 1 | namespace SolutionTemplateGenerator.Core.ManifestCreator 2 | { 3 | using System.IO; 4 | using System.Text.RegularExpressions; 5 | using SolutionTemplateGenerator.Core.Utils; 6 | 7 | public class Project 8 | { 9 | private static readonly Regex AssemblyVersionRegex = new Regex("\\s*[\\[<]\\s*[Aa]ssembly\\s*:\\s*(System.Reflection.)?AssemblyVersion\\s*\\(\\s*\"(?.*?)(\"\\s*\\)\\s*[\\]>])", RegexOptions.Singleline | RegexOptions.Compiled); 10 | 11 | public string ProjectGuid { get; set; } 12 | 13 | public string ProjectTypeGuid { get; set; } 14 | 15 | public string ProjectName { get; set; } 16 | 17 | public string RelativePath { get; set; } 18 | 19 | public string SolutionFilePath { get; set; } 20 | 21 | public string ProjectTypeName 22 | { 23 | get 24 | { 25 | string name; 26 | KnownProjectTypeGuid.ProjectTypes.TryGetValue(ProjectTypeGuid, out name); 27 | return name; 28 | } 29 | } 30 | 31 | public string Version 32 | { 33 | get 34 | { 35 | return getVersion(); 36 | } 37 | } 38 | 39 | private string getVersion() 40 | { 41 | var version = "1.0"; 42 | var assemblyInfoFile = Path.Combine(Path.GetDirectoryName(FullPath), "Properties\\AssemblyInfo.cs"); 43 | if (!File.Exists(assemblyInfoFile)) 44 | return version; 45 | 46 | var versionMatches = AssemblyVersionRegex.Matches(File.ReadAllText(assemblyInfoFile)); 47 | foreach (Match match in versionMatches) 48 | { 49 | version = match.Groups["ValueToBeReplaced"].Value; 50 | } 51 | return version; 52 | } 53 | 54 | public string FullPath 55 | { 56 | get { return Path.Combine(SolutionFilePath.GetDirectoryName(), RelativePath); } 57 | } 58 | } 59 | } -------------------------------------------------------------------------------- /SolutionTemplateGenerator/MVVM/FolderBrowserDialogBehavior.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using System.Windows.Forms; 3 | using System.Windows.Interactivity; 4 | 5 | namespace SolutionTemplateGenerator.MVVM 6 | { 7 | public class FolderBrowserDialogBehavior : TargetedTriggerAction 8 | { 9 | #region Fields 10 | 11 | public static readonly DependencyProperty FolderBrowserDescriptionProperty = 12 | DependencyProperty.Register("FolderBrowserDescription", typeof(string), 13 | typeof(FolderBrowserDialogBehavior), null); 14 | 15 | public static readonly DependencyProperty FolderBrowserDialogResultCommandProperty = 16 | DependencyProperty.Register("FolderBrowserDialogResultCommand", 17 | typeof(object), typeof(FolderBrowserDialogBehavior), null); 18 | 19 | #endregion Fields 20 | 21 | #region Properties 22 | 23 | public string FolderBrowserDescription 24 | { 25 | get { return (string)GetValue(FolderBrowserDescriptionProperty); } 26 | set { SetValue(FolderBrowserDescriptionProperty, value); } 27 | } 28 | 29 | public object FolderBrowserDialogResultCommand 30 | { 31 | get { return GetValue(FolderBrowserDialogResultCommandProperty); } 32 | set { SetValue(FolderBrowserDialogResultCommandProperty, value); } 33 | } 34 | 35 | #endregion Properties 36 | 37 | #region Methods (1) 38 | 39 | // Protected Methods (1)  40 | 41 | protected override void Invoke(object parameter) 42 | { 43 | using (var folderBrowserDialog = new FolderBrowserDialog { ShowNewFolderButton = true }) 44 | { 45 | if (!string.IsNullOrEmpty(FolderBrowserDescription)) 46 | { 47 | folderBrowserDialog.Description = FolderBrowserDescription; 48 | } 49 | 50 | var result = folderBrowserDialog.ShowDialog(); 51 | if (result == DialogResult.OK) 52 | FolderBrowserDialogResultCommand = folderBrowserDialog.SelectedPath; 53 | } 54 | } 55 | 56 | #endregion Methods 57 | } 58 | } -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | using System.Windows; 6 | 7 | // General Information about an assembly is controlled through the following 8 | // set of attributes. Change these attribute values to modify the information 9 | // associated with an assembly. 10 | [assembly: AssemblyTitle("SolutionTemplateGenerator")] 11 | [assembly: AssemblyDescription("")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("")] 14 | [assembly: AssemblyProduct("SolutionTemplateGenerator")] 15 | [assembly: AssemblyCopyright("Copyright © 2013")] 16 | [assembly: AssemblyTrademark("")] 17 | [assembly: AssemblyCulture("")] 18 | 19 | // Setting ComVisible to false makes the types in this assembly not visible 20 | // to COM components. If you need to access a type in this assembly from 21 | // COM, set the ComVisible attribute to true on that type. 22 | [assembly: ComVisible(false)] 23 | 24 | //In order to begin building localizable applications, set 25 | //CultureYouAreCodingWith in your .csproj file 26 | //inside a . For example, if you are using US english 27 | //in your source files, set the to en-US. Then uncomment 28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in 29 | //the line below to match the UICulture setting in the project file. 30 | 31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 32 | 33 | 34 | [assembly: ThemeInfo( 35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 36 | //(used if a resource is not found in the page, 37 | // or application resource dictionaries) 38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 39 | //(used if a resource is not found in the page, 40 | // app, or any theme specific resource dictionaries) 41 | )] 42 | 43 | 44 | // Version information for an assembly consists of the following four values: 45 | // 46 | // Major Version 47 | // Minor Version 48 | // Build Number 49 | // Revision 50 | // 51 | // You can specify all the values or you can default the Build and Revision Numbers 52 | // by using the '*' as shown below: 53 | // [assembly: AssemblyVersion("1.0.*")] 54 | [assembly: AssemblyVersion("1.4.0.0")] 55 | [assembly: AssemblyFileVersion("1.4.0.0")] 56 | -------------------------------------------------------------------------------- /SafeRootProjectWizard/SafeRootProjectWizard.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | AnyCPU 6 | 8.0.30703 7 | 2.0 8 | {15539E15-F581-48FD-8E2E-2C8D5EEAEBF1} 9 | Library 10 | Properties 11 | SafeRootProjectWizard 12 | SafeRootProjectWizard 13 | v4.0 14 | 512 15 | 16 | 17 | pdbonly 18 | true 19 | bin\Release\ 20 | TRACE 21 | prompt 22 | 4 23 | 24 | 25 | true 26 | 27 | 28 | key.snk 29 | 30 | 31 | 32 | True 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 56 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /SolutionTemplateGenerator/Core/XmlSchema/VsixIdentifier.cs: -------------------------------------------------------------------------------- 1 | using System.CodeDom.Compiler; 2 | using System.Collections.Generic; 3 | using System.Xml; 4 | using System.Xml.Serialization; 5 | 6 | namespace SolutionTemplateGenerator.Core.XmlSchema 7 | { 8 | [GeneratedCode("System.Xml", "2.0.50727.4927"), XmlType(AnonymousType = true, Namespace = "http://schemas.microsoft.com/developer/vsx-schema/2010")] 9 | public class VsixIdentifier 10 | { 11 | public string Name 12 | { 13 | get; 14 | set; 15 | } 16 | 17 | public string Author 18 | { 19 | get; 20 | set; 21 | } 22 | 23 | public string Version 24 | { 25 | get; 26 | set; 27 | } 28 | public string Description 29 | { 30 | get; 31 | set; 32 | } 33 | 34 | public ushort Locale 35 | { 36 | get; 37 | set; 38 | } 39 | 40 | public string MoreInfoUrl 41 | { 42 | get; 43 | set; 44 | } 45 | 46 | public string License 47 | { 48 | get; 49 | set; 50 | } 51 | 52 | public string GettingStartedGuide 53 | { 54 | get; 55 | set; 56 | } 57 | 58 | public string Icon 59 | { 60 | get; 61 | set; 62 | } 63 | 64 | public string PreviewImage 65 | { 66 | get; 67 | set; 68 | } 69 | 70 | public bool InstalledByMsi 71 | { 72 | get; 73 | set; 74 | } 75 | 76 | [XmlIgnore] 77 | public bool InstalledByMsiSpecified 78 | { 79 | get; 80 | set; 81 | } 82 | 83 | [XmlArrayItem("VisualStudio", typeof(VsixIdentifierVisualStudio), IsNullable = false), XmlArrayItem("IsolatedShell", typeof(VsixIdentifierIsolatedShell), IsNullable = false)] 84 | public List SupportedProducts 85 | { 86 | get; 87 | set; 88 | } 89 | 90 | public VsixIdentifierSupportedFrameworkRuntimeEdition SupportedFrameworkRuntimeEdition 91 | { 92 | get; 93 | set; 94 | } 95 | 96 | public bool SystemComponent 97 | { 98 | get; 99 | set; 100 | } 101 | 102 | [XmlIgnore] 103 | public bool SystemComponentSpecified 104 | { 105 | get; 106 | set; 107 | } 108 | 109 | public bool AllUsers 110 | { 111 | get; 112 | set; 113 | } 114 | 115 | [XmlIgnore] 116 | public bool AllUsersSpecified 117 | { 118 | get; 119 | set; 120 | } 121 | 122 | [XmlAttribute] 123 | public string Id 124 | { 125 | get; 126 | set; 127 | } 128 | 129 | public VsixIdentifier() 130 | { 131 | if (this.SupportedFrameworkRuntimeEdition == null) 132 | { 133 | this.SupportedFrameworkRuntimeEdition = new VsixIdentifierSupportedFrameworkRuntimeEdition(); 134 | } 135 | if (this.SupportedProducts == null) 136 | { 137 | this.SupportedProducts = new List(); 138 | } 139 | } 140 | } 141 | } -------------------------------------------------------------------------------- /SolutionTemplateGenerator/MVVM/OpenFileDialogBoxBehavior.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using System.Windows.Controls; 3 | using System.Windows.Interactivity; 4 | using Microsoft.Win32; 5 | 6 | namespace SolutionTemplateGenerator.MVVM 7 | { 8 | public class OpenFileDialogBoxBehavior : TargetedTriggerAction