From 84e8cbcd6034e63056051deb102bbbf817d6baa4 Mon Sep 17 00:00:00 2001 From: Thiago Loureiro Date: Wed, 3 Apr 2019 00:22:11 +0200 Subject: [PATCH] VS 2009 Support --- Dapper.Crud.Tests/Dapper.Crud.Tests.csproj | 17 +++++------ Dapper.Crud.VSExtension/CreateCrudPackage.cs | 26 +++++++---------- .../Dapper.Crud.VSExtension.csproj | 23 +++++++-------- .../Properties/AssemblyInfo.cs | 4 +-- Dapper.Crud.VSExtension/VSPackage.Designer.cs | 2 +- Dapper.Crud.VSExtension/app.config | 28 +++++++++---------- .../frmExtension.Designer.cs | 2 +- .../source.extension.vsixmanifest | 15 +++++----- 8 files changed, 56 insertions(+), 61 deletions(-) diff --git a/Dapper.Crud.Tests/Dapper.Crud.Tests.csproj b/Dapper.Crud.Tests/Dapper.Crud.Tests.csproj index dee299c..68be9cf 100644 --- a/Dapper.Crud.Tests/Dapper.Crud.Tests.csproj +++ b/Dapper.Crud.Tests/Dapper.Crud.Tests.csproj @@ -8,7 +8,7 @@ Properties Dapper.Crud.Tests Dapper.Crud.Tests - v4.6.1 + v4.7.2 512 {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 15.0 @@ -18,6 +18,7 @@ UnitTest + true @@ -37,10 +38,10 @@ 4 - - + + - 2.4.0 + 2.4.1 2.0.3 @@ -49,16 +50,16 @@ 0.10.0 - 2.4.0 + 2.4.1 - 2.4.0 + 2.4.1 - 2.4.0 + 2.4.1 - 2.4.0 + 2.4.1 runtime; build; native; contentfiles; analyzers all diff --git a/Dapper.Crud.VSExtension/CreateCrudPackage.cs b/Dapper.Crud.VSExtension/CreateCrudPackage.cs index aefa2e2..bb73d64 100644 --- a/Dapper.Crud.VSExtension/CreateCrudPackage.cs +++ b/Dapper.Crud.VSExtension/CreateCrudPackage.cs @@ -4,15 +4,17 @@ using System; using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; +using System.Threading; +using Task = System.Threading.Tasks.Task; namespace Dapper.Crud.VSExtension { - [PackageRegistration(UseManagedResourcesOnly = true)] + [PackageRegistration(UseManagedResourcesOnly = true, AllowsBackgroundLoading = true)] [InstalledProductRegistration("#110", "#112", "1.0", IconResourceID = 400)] // Info on this package for Help/About [ProvideMenuResource("Menus.ctmenu", 1)] [Guid(CreateCrudPackage.PackageGuidString)] [SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1650:ElementDocumentationMustBeSpelledCorrectly", Justification = "pkgdef, VS and vsixmanifest are valid VS terms")] - public sealed class CreateCrudPackage : Package + public sealed class CreateCrudPackage : AsyncPackage { public DTE2 Dte; @@ -23,24 +25,16 @@ public sealed class CreateCrudPackage : Package /// public const string PackageGuidString = "cb7802c6-dd51-4368-ad9a-413841cf0287"; - /// - /// Initializes a new instance of the class. - /// - public CreateCrudPackage() - { - } - #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() + protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress progress) { + // When initialized asynchronously, the current thread may be a background thread at this point. + // Do any initialization that requires the UI thread after switching to the UI thread. + await this.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); CreateCrud.Initialize(this); - base.Initialize(); - Dte = GetService(typeof(DTE)) as DTE2; + await base.InitializeAsync(cancellationToken, progress); + Dte = await GetServiceAsync(typeof(DTE)) as DTE2; Instance = this; Logger.Initialize(this, "Dapper CRUD Generator"); } diff --git a/Dapper.Crud.VSExtension/Dapper.Crud.VSExtension.csproj b/Dapper.Crud.VSExtension/Dapper.Crud.VSExtension.csproj index d306378..b69d877 100644 --- a/Dapper.Crud.VSExtension/Dapper.Crud.VSExtension.csproj +++ b/Dapper.Crud.VSExtension/Dapper.Crud.VSExtension.csproj @@ -7,6 +7,7 @@ true + true @@ -25,7 +26,7 @@ Properties Dapper.Crud.VSExtension Dapper.Crud.VSExtension - v4.6.1 + v4.7.2 true true true @@ -307,25 +308,25 @@ - 1.50.5 + 1.60.1 - 1.0.5 + 1.0.7 1.1.3 - 2.9.0 + 3.0.0 runtime; build; native; contentfiles; analyzers all - - + + - - + + @@ -334,10 +335,10 @@ - - + + - + runtime; build; native; contentfiles; analyzers all diff --git a/Dapper.Crud.VSExtension/Properties/AssemblyInfo.cs b/Dapper.Crud.VSExtension/Properties/AssemblyInfo.cs index 1facc45..ae95b65 100644 --- a/Dapper.Crud.VSExtension/Properties/AssemblyInfo.cs +++ b/Dapper.Crud.VSExtension/Properties/AssemblyInfo.cs @@ -11,5 +11,5 @@ [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] -[assembly: AssemblyVersion("2.8.1.0")] -[assembly: AssemblyFileVersion("2.8.1.0")] \ No newline at end of file +[assembly: AssemblyVersion("3.0.0.0")] +[assembly: AssemblyFileVersion("3.0.0.0")] \ No newline at end of file diff --git a/Dapper.Crud.VSExtension/VSPackage.Designer.cs b/Dapper.Crud.VSExtension/VSPackage.Designer.cs index 0439eb1..5e771db 100644 --- a/Dapper.Crud.VSExtension/VSPackage.Designer.cs +++ b/Dapper.Crud.VSExtension/VSPackage.Designer.cs @@ -19,7 +19,7 @@ namespace Dapper.Crud.VSExtension { // 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", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class VSPackage { diff --git a/Dapper.Crud.VSExtension/app.config b/Dapper.Crud.VSExtension/app.config index 8d5dcf8..124fe0b 100644 --- a/Dapper.Crud.VSExtension/app.config +++ b/Dapper.Crud.VSExtension/app.config @@ -1,39 +1,39 @@ - + - - + + - - + + - - + + - - + + - - + + - + - + - \ No newline at end of file + diff --git a/Dapper.Crud.VSExtension/frmExtension.Designer.cs b/Dapper.Crud.VSExtension/frmExtension.Designer.cs index ecc9e78..99413fd 100644 --- a/Dapper.Crud.VSExtension/frmExtension.Designer.cs +++ b/Dapper.Crud.VSExtension/frmExtension.Designer.cs @@ -355,7 +355,7 @@ private void InitializeComponent() this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "frmExtension"; - this.Text = "Dapper Extension 2.8"; + this.Text = "Dapper Extension 3.0"; this.gBox.ResumeLayout(false); this.gBox.PerformLayout(); this.groupBox1.ResumeLayout(false); diff --git a/Dapper.Crud.VSExtension/source.extension.vsixmanifest b/Dapper.Crud.VSExtension/source.extension.vsixmanifest index 16e2091..074f177 100644 --- a/Dapper.Crud.VSExtension/source.extension.vsixmanifest +++ b/Dapper.Crud.VSExtension/source.extension.vsixmanifest @@ -1,7 +1,7 @@  - + Dapper Crud Generator Generate CRUD easily with Dapper from your existing Models https://github.com/thiagoloureiro/Dapper.Crud.Extension @@ -10,16 +10,15 @@ Resources\settingsbig.png c#, dapper, model, crud, generator - - - + + + - - - - + + +