diff --git a/SSMSExecutor/ExecutorPackage.cs b/SSMSExecutor/ExecutorPackage.cs index cb3fcb7..5ea2581 100644 --- a/SSMSExecutor/ExecutorPackage.cs +++ b/SSMSExecutor/ExecutorPackage.cs @@ -1,28 +1,30 @@ -using System; -using System.IO; -using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; -using System.Globalization; -using System.Text.RegularExpressions; -using System.Runtime.InteropServices; +using Devvcat.SSMS.Options; using Microsoft.VisualStudio; using Microsoft.VisualStudio.Shell; using Microsoft.VisualStudio.Shell.Interop; using Microsoft.Win32; -using Devvcat.SSMS.Options; +using System; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.IO; +using System.Runtime.InteropServices; +using System.Text.RegularExpressions; +using System.Threading; +using System.Threading.Tasks; namespace Devvcat.SSMS { - [PackageRegistration(UseManagedResourcesOnly = true)] - [InstalledProductRegistration("#110", "#112", "2.0.2", IconResourceID = 400)] // Info on this package for Help/About + [PackageRegistration(UseManagedResourcesOnly = true, AllowsBackgroundLoading = true)] + [InstalledProductRegistration("#110", "#112", "3.0.0", IconResourceID = 400)] // Info on this package for Help/About [ProvideMenuResource("Menus.ctmenu", 1)] - [ProvideAutoLoad(VSConstants.UICONTEXT.ShellInitialized_string)] + [ProvideAutoLoad(VSConstants.UICONTEXT.ShellInitialized_string, PackageAutoLoadFlags.BackgroundLoad)] #if DEBUG [ProvideOptionPage(typeof(GeneralOptionsPage), "SSMS Executor", "General", 100, 101, true)] #endif [Guid(PackageGuidString)] [SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1650:ElementDocumentationMustBeSpelledCorrectly", Justification = "pkgdef, VS and vsixmanifest are valid VS terms")] - public sealed class ExecutorPackage : Package + public sealed class ExecutorPackage : AsyncPackage { private const string PackageGuidString = "a64d9865-b938-4543-bf8f-a553cc4f67f3"; @@ -30,8 +32,10 @@ public ExecutorPackage() { } - protected override void Initialize() + protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress progress) { + await this.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); + base.Initialize(); ExecutorCommand.Initialize(this); diff --git a/SSMSExecutor/Properties/AssemblyInfo.cs b/SSMSExecutor/Properties/AssemblyInfo.cs index 953db32..307b24f 100644 --- a/SSMSExecutor/Properties/AssemblyInfo.cs +++ b/SSMSExecutor/Properties/AssemblyInfo.cs @@ -6,11 +6,11 @@ // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("SSMS Executor")] -[assembly: AssemblyDescription("SQL Server Management Studio Add-in")] +[assembly: AssemblyDescription("SQL Server Management Studio Add-in for executing the current statement, based on the cursor position.")] [assembly: AssemblyProduct("SSMS Executor")] [assembly: AssemblyCopyright("")] -[assembly: AssemblyFileVersion("2.0.0.0")] -[assembly: AssemblyInformationalVersion("2.0-alpha1")] +[assembly: AssemblyFileVersion("3.0.0.0")] +[assembly: AssemblyInformationalVersion("3.0-alpha1")] // 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 @@ -27,6 +27,6 @@ // 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("2.0.3.*")] +[assembly: AssemblyVersion("3.0.0.*")] [assembly: AssemblyTrademark("")] //[assembly: AssemblyFileVersion("0.1.0.0")] diff --git a/SSMSExecutor/Properties/Settings.Designer.cs b/SSMSExecutor/Properties/Settings.Designer.cs index 54284ad..b46b1a3 100644 --- a/SSMSExecutor/Properties/Settings.Designer.cs +++ b/SSMSExecutor/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace Devvcat.SSMS.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.3.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.14.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); diff --git a/SSMSExecutor/SSMSExecutor.csproj b/SSMSExecutor/SSMSExecutor.csproj index 814eda6..4680e31 100644 --- a/SSMSExecutor/SSMSExecutor.csproj +++ b/SSMSExecutor/SSMSExecutor.csproj @@ -1,47 +1,8 @@  - - - + - $(VisualStudioVersion) + 17.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - true - Program - C:\Program Files %28x86%29\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\ssms.exe - $(ReferencePath);$(MSBuildThisFileDirectory)..\References\2010 - - - true - - - v3 - - - - - - - true - bin\x86\Debug\ - TRACE;DEBUG;SSMS - full - x86 - prompt - MinimumRecommendedRules.ruleset - True - C:\Program Files %28x86%29\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\Extensions\SqlCeToolbox - - - bin\x86\Release\ - TRACE;SSMS - true - pdbonly - x86 - prompt - MinimumRecommendedRules.ruleset @@ -54,34 +15,38 @@ Properties Devvcat.SSMS SSMSExecutor - v4.5.2 + v4.7.2 true + true true - true - true + false + false true - false + true + Program + $(DevEnvDir)devenv.exe + /rootsuffix Exp true full false bin\Debug\ - TRACE;DEBUG;SSMS + DEBUG;TRACE prompt 4 True - C:\Program Files %28x86%29\Microsoft SQL Server Management Studio 18\Common7\IDE\Extensions\SSMSExecutor - True - True + C:\Program Files\Microsoft SQL Server Management Studio 21\Release\Common7\IDE\Extensions\SSMSExecutor + False pdbonly true bin\Release\ - TRACE;SSMS + TRACE prompt 4 + False @@ -91,6 +56,9 @@ Component + + Designer + True @@ -99,10 +67,6 @@ - - Designer - - SettingsSingleFileGenerator Settings.Designer.cs @@ -112,131 +76,26 @@ - - False - - - False - - - False - - - False - - - - ..\lib\Microsoft.ReportViewer.Common.dll + + C:\Program Files\Microsoft SQL Server Management Studio 21\Release\Common7\IDE\Extensions\Application\Microsoft.SqlServer.TransactSql.ScriptDom.dll False - - ..\lib\Microsoft.ReportViewer.WinForms.dll - False - - - ..\packages\Microsoft.SqlServer.TransactSql.ScriptDom.14.0.3660.1\lib\net40\Microsoft.SqlServer.TransactSql.ScriptDom.dll - - - False - - - - - - ..\packages\Microsoft.VisualStudio.Imaging.14.3.25407\lib\net45\Microsoft.VisualStudio.Imaging.dll - True - - - ..\packages\Microsoft.VisualStudio.OLE.Interop.7.10.6070\lib\Microsoft.VisualStudio.OLE.Interop.dll - True - - - ..\packages\Microsoft.VisualStudio.Shell.14.0.14.3.25407\lib\Microsoft.VisualStudio.Shell.14.0.dll - True - - - ..\packages\Microsoft.VisualStudio.Shell.Immutable.10.0.10.0.30319\lib\net40\Microsoft.VisualStudio.Shell.Immutable.10.0.dll - True - - - ..\packages\Microsoft.VisualStudio.Shell.Immutable.11.0.11.0.50727\lib\net45\Microsoft.VisualStudio.Shell.Immutable.11.0.dll - True - - - ..\packages\Microsoft.VisualStudio.Shell.Immutable.12.0.12.0.21003\lib\net45\Microsoft.VisualStudio.Shell.Immutable.12.0.dll - True - - - ..\packages\Microsoft.VisualStudio.Shell.Immutable.14.0.14.3.25407\lib\net45\Microsoft.VisualStudio.Shell.Immutable.14.0.dll - True - - - ..\packages\Microsoft.VisualStudio.Shell.Interop.7.10.6071\lib\Microsoft.VisualStudio.Shell.Interop.dll - True - - - True - ..\packages\Microsoft.VisualStudio.Shell.Interop.10.0.10.0.30319\lib\Microsoft.VisualStudio.Shell.Interop.10.0.dll - True - - - True - ..\packages\Microsoft.VisualStudio.Shell.Interop.11.0.11.0.61030\lib\Microsoft.VisualStudio.Shell.Interop.11.0.dll - True - - - True - ..\packages\Microsoft.VisualStudio.Shell.Interop.12.0.12.0.30110\lib\Microsoft.VisualStudio.Shell.Interop.12.0.dll - True - - - ..\packages\Microsoft.VisualStudio.Shell.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.Shell.Interop.8.0.dll - True - - - ..\packages\Microsoft.VisualStudio.Shell.Interop.9.0.9.0.30729\lib\Microsoft.VisualStudio.Shell.Interop.9.0.dll - True - - - ..\packages\Microsoft.VisualStudio.TextManager.Interop.7.10.6070\lib\Microsoft.VisualStudio.TextManager.Interop.dll - True - - - ..\packages\Microsoft.VisualStudio.TextManager.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.TextManager.Interop.8.0.dll - True - - - ..\packages\Microsoft.VisualStudio.Threading.14.1.111\lib\net45\Microsoft.VisualStudio.Threading.dll - True - - - ..\packages\Microsoft.VisualStudio.Utilities.14.3.25407\lib\net45\Microsoft.VisualStudio.Utilities.dll - True - - - ..\packages\Microsoft.VisualStudio.Validation.14.1.111\lib\net45\Microsoft.VisualStudio.Validation.dll - True - - - False - - + - - - - - - - + + + + compile; build; native; contentfiles; analyzers; buildtransitive + + @@ -260,21 +119,12 @@ Designer - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - -