diff options
author | nosami <jasonimison@gmail.com> | 2019-09-13 15:00:02 +0300 |
---|---|---|
committer | nosami <jasonimison@gmail.com> | 2019-09-13 15:00:02 +0300 |
commit | 9b15cc50441717afdf94701b3bc582b2b53111a3 (patch) | |
tree | 4357b7b11ed3076f2daabcbcb34cc762994dfc64 /main/src/addins/MonoDevelop.DotNetCore | |
parent | ada3941894c4f8157a705dab1b3ab1b80d92efd4 (diff) |
Force install of 2.2 runtime
Diffstat (limited to 'main/src/addins/MonoDevelop.DotNetCore')
-rw-r--r-- | main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore/DotNetCoreRuntimeSystemInformation.cs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore/DotNetCoreRuntimeSystemInformation.cs b/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore/DotNetCoreRuntimeSystemInformation.cs index 1a4373d090..ba68ab7289 100644 --- a/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore/DotNetCoreRuntimeSystemInformation.cs +++ b/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore/DotNetCoreRuntimeSystemInformation.cs @@ -33,6 +33,10 @@ using MonoDevelop.Ide.Updater; namespace MonoDevelop.DotNetCore { + /// <summary> + /// Used to fetch a 2.2 runtime for Azure functions as + /// 3.0 and later currently don't work for this. + /// </summary> sealed class DotNetCoreRuntimeSystemInformation : ProductInformationProvider { public override string Title => GettextCatalog.GetString (".NET Core Runtime"); @@ -45,13 +49,14 @@ namespace MonoDevelop.DotNetCore public override UpdateInfo GetUpdateInfo () { - var latestRuntimeVersion = DotNetCoreRuntime.Versions.FirstOrDefault (); + var latestRuntimeVersion = + DotNetCoreRuntime.Versions.FirstOrDefault(v => v.Major == 2 && v.Minor >= 2); if (latestRuntimeVersion != null) { return new UpdateInfo (ApplicationId, latestRuntimeVersion.Version); } - // .NET Core not installed, so don't offer as new install - return null; + // Force the install of the 2.2 runtime + return new UpdateInfo (ApplicationId, versionId: 0); } string GetDescription () |