From 5dbaaf4b436fc5ef2fc6c553ca66f75b69e40233 Mon Sep 17 00:00:00 2001 From: Ivan Naranjo Date: Wed, 2 Aug 2017 17:52:25 +0100 Subject: [PATCH] Master fixing bug 773 and 776 (#775) * Detect that we have a supported version of .NET Core * Ensure that we can publish. * Update the version number. * Actually return a valid path for external tools. --- .../GenerateConfigurationContextMenuCommand.cs | 3 ++- .../GoogleCloudExtension/Properties/AssemblyInfo.cs | 2 +- .../GoogleCloudExtension/VsVersion/VS15/ToolsPathProvider.cs | 5 ++++- .../GoogleCloudExtension/source.extension.vsixmanifest | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/GoogleCloudExtension/GoogleCloudExtension/GenerateConfigurationCommand/GenerateConfigurationContextMenuCommand.cs b/GoogleCloudExtension/GoogleCloudExtension/GenerateConfigurationCommand/GenerateConfigurationContextMenuCommand.cs index 1d920c743..eb5bf49c8 100644 --- a/GoogleCloudExtension/GoogleCloudExtension/GenerateConfigurationCommand/GenerateConfigurationContextMenuCommand.cs +++ b/GoogleCloudExtension/GoogleCloudExtension/GenerateConfigurationCommand/GenerateConfigurationContextMenuCommand.cs @@ -13,6 +13,7 @@ // limitations under the License. using GoogleCloudExtension.Deployment; +using GoogleCloudExtension.PublishDialog; using GoogleCloudExtension.SolutionUtils; using GoogleCloudExtension.Utils; using Microsoft.VisualStudio.Shell; @@ -161,7 +162,7 @@ private void OnBeforeQueryStatus(object sender, EventArgs e) // Ensure that the menu entry is only available for ASP.NET Core projects. var selectedProject = SolutionHelper.CurrentSolution.SelectedProject; - if (selectedProject == null || selectedProject.ProjectType != KnownProjectTypes.NetCoreWebApplication1_0) + if (selectedProject == null || !PublishDialogWindow.CanPublish(selectedProject)) { menuCommand.Visible = false; } diff --git a/GoogleCloudExtension/GoogleCloudExtension/Properties/AssemblyInfo.cs b/GoogleCloudExtension/GoogleCloudExtension/Properties/AssemblyInfo.cs index 02457cfa5..8180a1d68 100644 --- a/GoogleCloudExtension/GoogleCloudExtension/Properties/AssemblyInfo.cs +++ b/GoogleCloudExtension/GoogleCloudExtension/Properties/AssemblyInfo.cs @@ -35,7 +35,7 @@ // This version number matches the version in the .vsixmanifest. Please update both versions at the // same time. -[assembly: AssemblyVersion("1.2.7.0")] +[assembly: AssemblyVersion("1.2.8.0")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: InternalsVisibleTo( "GoogleCloudExtensionUnitTests," + diff --git a/GoogleCloudExtension/GoogleCloudExtension/VsVersion/VS15/ToolsPathProvider.cs b/GoogleCloudExtension/GoogleCloudExtension/VsVersion/VS15/ToolsPathProvider.cs index 7e2279c75..7fa1eb7d7 100644 --- a/GoogleCloudExtension/GoogleCloudExtension/VsVersion/VS15/ToolsPathProvider.cs +++ b/GoogleCloudExtension/GoogleCloudExtension/VsVersion/VS15/ToolsPathProvider.cs @@ -41,7 +41,10 @@ public string GetDotnetPath() public string GetExternalToolsPath() { - return ""; + var programFilesPath = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86); + var result = Path.Combine(programFilesPath, $@"Microsoft Visual Studio\2017\{_edition}\Web\External"); + GcpOutputWindow.OutputDebugLine($"External tools path: {result}"); + return result; } public string GetMsbuildPath() diff --git a/GoogleCloudExtension/GoogleCloudExtension/source.extension.vsixmanifest b/GoogleCloudExtension/GoogleCloudExtension/source.extension.vsixmanifest index d40313745..d213a2306 100644 --- a/GoogleCloudExtension/GoogleCloudExtension/source.extension.vsixmanifest +++ b/GoogleCloudExtension/GoogleCloudExtension/source.extension.vsixmanifest @@ -5,7 +5,7 @@ The Version attribute of the Identity element *must* match the version number in Properties\AssemblyInfo.cs, to ensure accurate metrics. --> - + Google Cloud Tools for Visual Studio Tools to develop applications for Google Cloud Platform. https://cloud.google.com/visual-studio/