From 5c96d8c0c9e88404cf261018e70403a6bbe1ee05 Mon Sep 17 00:00:00 2001 From: Christian Resma Helle Date: Sun, 8 Mar 2015 21:48:52 +0100 Subject: [PATCH] Initial effort for supporting for Visual Studio 2015 (experimental) --- .hgignore | 3 +- .../RESW File Code Generator.sln | 16 +++-- .../VSPackage/Resources.Designer.cs | 2 +- .../VSPackage/VSPackage.csproj | 40 ++++++++++- .../VSPackage/VisualStudio2015Package.cs | 70 +++++++++++++++++++ .../VSPackage/source.extension.vsixmanifest | 2 +- 6 files changed, 122 insertions(+), 11 deletions(-) create mode 100644 RESW File Code Generator/VSPackage/VisualStudio2015Package.cs diff --git a/.hgignore b/.hgignore index 4bca060..bc417e4 100644 --- a/.hgignore +++ b/.hgignore @@ -6,4 +6,5 @@ syntax: glob *.user *ReSharper* */Setup/Setup/* -UpgradeLog.htm \ No newline at end of file +UpgradeLog.htm +RESW File Code Generator/Backup/ \ No newline at end of file diff --git a/RESW File Code Generator/RESW File Code Generator.sln b/RESW File Code Generator/RESW File Code Generator.sln index 7e84718..11418e0 100644 --- a/RESW File Code Generator/RESW File Code Generator.sln +++ b/RESW File Code Generator/RESW File Code Generator.sln @@ -1,18 +1,20 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReswCodeGen.Tests", "ReswCodeGen.Tests\ReswCodeGen.Tests.csproj", "{B56DDC92-E86D-46AA-BE28-7ACA670EE9CE}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VSPackage", "VSPackage\VSPackage.csproj", "{2451352F-1CB8-494A-920B-024B8B486185}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VSPackage_IntegrationTests", "VSPackage\VSPackage_IntegrationTests\VSPackage_IntegrationTests.csproj", "{D03690D8-EE17-4284-9403-F3F277CF4580}" -EndProject +# Visual Studio 2013 +VisualStudioVersion = 12.0.31101.0 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{91EF78EF-DAB6-4031-AA01-3D127F1E0BCD}" ProjectSection(SolutionItems) = preProject IntegrationTests.testsettings = IntegrationTests.testsettings UnitTests.testsettings = UnitTests.testsettings EndProjectSection EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReswCodeGen.Tests", "ReswCodeGen.Tests\ReswCodeGen.Tests.csproj", "{B56DDC92-E86D-46AA-BE28-7ACA670EE9CE}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VSPackage", "VSPackage\VSPackage.csproj", "{2451352F-1CB8-494A-920B-024B8B486185}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VSPackage_IntegrationTests", "VSPackage\VSPackage_IntegrationTests\VSPackage_IntegrationTests.csproj", "{D03690D8-EE17-4284-9403-F3F277CF4580}" +EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VSPackage_UnitTests", "VSPackage\VSPackage_UnitTests\VSPackage_UnitTests.csproj", "{64F7EAFB-9AF1-4DA4-A4DA-013B4DF10306}" EndProject Global diff --git a/RESW File Code Generator/VSPackage/Resources.Designer.cs b/RESW File Code Generator/VSPackage/Resources.Designer.cs index b246db4..58f501f 100644 --- a/RESW File Code Generator/VSPackage/Resources.Designer.cs +++ b/RESW File Code Generator/VSPackage/Resources.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.18033 +// Runtime Version:4.0.30319.34014 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/RESW File Code Generator/VSPackage/VSPackage.csproj b/RESW File Code Generator/VSPackage/VSPackage.csproj index 6f18a61..25bc5ea 100644 --- a/RESW File Code Generator/VSPackage/VSPackage.csproj +++ b/RESW File Code Generator/VSPackage/VSPackage.csproj @@ -1,9 +1,29 @@  - 11.0 + 12.0 11.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + + 4.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true @@ -120,6 +140,7 @@ + @@ -174,6 +195,23 @@ true + + + False + Microsoft .NET Framework 4.5 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + true diff --git a/RESW File Code Generator/VSPackage/VisualStudio2015Package.cs b/RESW File Code Generator/VSPackage/VisualStudio2015Package.cs new file mode 100644 index 0000000..9c97b05 --- /dev/null +++ b/RESW File Code Generator/VSPackage/VisualStudio2015Package.cs @@ -0,0 +1,70 @@ +using ChristianHelle.DeveloperTools.CodeGenerators.Resw.VSPackage.CustomTool; +using Microsoft.VisualStudio.Shell; +using Microsoft.VisualStudio.Shell.Design.Serialization; +using System.Diagnostics; +using System.Globalization; +using System.Runtime.InteropServices; + +namespace ChristianHelle.DeveloperTools.CodeGenerators.Resw.VSPackage +{ + /// + /// This is the class that implements the package exposed by this assembly. + /// + /// The minimum requirement for a class to be considered a valid package for Visual Studio + /// is to implement the IVsPackage interface and register itself with the shell. + /// This package uses the helper classes defined inside the Managed Package Framework (MPF) + /// to do it: it derives from the Package class that provides the implementation of the + /// IVsPackage interface and uses the registration attributes defined in the framework to + /// register itself and its components with the shell. + /// + // This attribute tells the PkgDef creation utility (CreatePkgDef.exe) that this class is + // a package. + [PackageRegistration(UseManagedResourcesOnly = true)] + // This attribute is used to register the information needed to show this package + // in the Help/About dialog of Visual Studio. + [InstalledProductRegistration("#110", "#112", "1.0", IconResourceID = 400)] + [Guid(GuidList.guidVSPackagePkgString)] + [DefaultRegistryRoot("Software\\Microsoft\\VisualStudio\\13.0")] + [ProvideObject(typeof(ReswFileCSharpCodeGenerator))] + [ProvideObject(typeof(ReswFileVisualBasicCodeGenerator))] + [ProvideObject(typeof(ReswFileCSharpCodeGeneratorInternal))] + [ProvideObject(typeof(ReswFileVisualBasicCodeGeneratorInternal))] + [ProvideGeneratorAttribute(typeof(ReswFileCSharpCodeGenerator), "ReswFileCodeGenerator", "ResW File Code Generator for C#", "{FAE04EC1-301F-11D3-BF4B-00C04F79EFBC}", true)] // csharp + [ProvideGeneratorAttribute(typeof(ReswFileVisualBasicCodeGenerator), "ReswFileCodeGenerator", "ResW File Code Generator for VB", "{164B10B9-B200-11D0-8C61-00A0C91E29D5}", true)] // visual basic + [ProvideGeneratorAttribute(typeof(ReswFileCSharpCodeGenerator), "PublicReswFileCodeGenerator", "ResW File Code Generator for C#", "{FAE04EC1-301F-11D3-BF4B-00C04F79EFBC}", true)] // csharp + [ProvideGeneratorAttribute(typeof(ReswFileVisualBasicCodeGenerator), "PublicReswFileCodeGenerator", "ResW File Code Generator for VB", "{164B10B9-B200-11D0-8C61-00A0C91E29D5}", true)] // visual basic + [ProvideGeneratorAttribute(typeof(ReswFileCSharpCodeGeneratorInternal), "InternalReswFileCodeGenerator", "ResW File Code Generator for C#", "{FAE04EC1-301F-11D3-BF4B-00C04F79EFBC}", true)] // csharp + [ProvideGeneratorAttribute(typeof(ReswFileVisualBasicCodeGeneratorInternal), "InternalReswFileCodeGenerator", "ResW File Code Generator for VB", "{164B10B9-B200-11D0-8C61-00A0C91E29D5}", true)] // visual basic + public sealed class VisualStudio2015Package : Package + { + /// + /// Default constructor of the package. + /// Inside this method you can place any initialization code that does not require + /// any Visual Studio service because at this point the package object is created but + /// not sited yet inside Visual Studio environment. The place to do all the other + /// initialization is the Initialize method. + /// + public VisualStudio2015Package() + { + Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "Entering constructor for: {0}", this.ToString())); + } + + + + ///////////////////////////////////////////////////////////////////////////// + // Overridden Package Implementation + #region Package Members + + /// + /// Initialization of the package; this method is called right after the package is sited, so this is the place + /// where you can put all the initialization code that rely on services provided by VisualStudio. + /// + protected override void Initialize() + { + Debug.WriteLine (string.Format(CultureInfo.CurrentCulture, "Entering Initialize() of: {0}", this.ToString())); + base.Initialize(); + } + #endregion + + } +} diff --git a/RESW File Code Generator/VSPackage/source.extension.vsixmanifest b/RESW File Code Generator/VSPackage/source.extension.vsixmanifest index 0ed986c..f290630 100644 --- a/RESW File Code Generator/VSPackage/source.extension.vsixmanifest +++ b/RESW File Code Generator/VSPackage/source.extension.vsixmanifest @@ -13,7 +13,7 @@ License.txt - +