Skip to content

Draft: Support Net7 and Net8 #130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

using System;
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
Expand All @@ -38,7 +38,7 @@ namespace MonoDevelop.DotNetCore.Templating
[Extension]
class DotNetCoreProjectTemplateStringTagProvider : IStringTagProvider
{
readonly string [] SupportedSDK = { "2.1", "2.2", "3.0", "3.1", "5.0", "6.0" };
readonly string [] SupportedSDK = { "2.1", "2.2", "3.0", "3.1", "5.0", "6.0", "7.0", "8.0" };

public IEnumerable<StringTagDescription> GetTags (Type type)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ namespace MonoDevelop.DotNetCore.Templating
{
class DotNetCoreProjectTemplateWizard : TemplateWizard
{
const string defaultParameterNetCore80 = "UseNetCore80";
const string defaultParameterNetCore70 = "UseNetCore70";
const string defaultParameterNetCore60 = "UseNetCore60";
const string defaultParameterNetCore50 = "UseNetCore50";
const string defaultParameterNetCore30 = "UseNetCore30";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public IEnumerable<TargetFramework> GetFrameworks ()
"2.1", "2.0", "1.6", "1.5", "1.4", "1.3", "1.2", "1.1", "1.0"
};
static string [] supportedNetCoreAppVersions = {
"6.0", "5.0", "3.1", "3.0", "2.2", "2.1", "2.0", "1.1", "1.0"
"8.0", "7.0", "6.0", "5.0", "3.1", "3.0", "2.2", "2.1", "2.0", "1.1", "1.0"
};

public IEnumerable<TargetFramework> GetKnownFrameworks ()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace MonoDevelop.DotNetCore
public static class DotNetCoreSdk
{
static readonly Version DotNetCoreVersion2_1 = new Version (2, 1, 0);
internal static readonly DotNetCoreVersion DotNetCoreUnsupportedTargetFrameworkVersion = new DotNetCoreVersion (6, 1, 0);
internal static readonly DotNetCoreVersion DotNetCoreUnsupportedTargetFrameworkVersion = new DotNetCoreVersion (8, 1, 0);

static DotNetCoreSdk ()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ class DotNetCoreVersion : IEquatable<DotNetCoreVersion>, IComparable, IComparabl
internal static readonly DotNetCoreVersion MinimumSupportedSdkVersion50 = new DotNetCoreVersion (5, 0, 400);
internal static readonly DotNetCoreVersion MinimumSupportedSdkVersion60 = new DotNetCoreVersion (6, 0, 6);

internal static readonly DotNetCoreVersion MinimumSupportedSdkVersion70 = new DotNetCoreVersion (7, 0, 7);

internal static readonly DotNetCoreVersion MinimumSupportedSdkVersion80 = new DotNetCoreVersion (8, 0, 8);
internal DotNetCoreVersion (int major, int minor, int patch)
: this (new Version (major, minor, patch))
{
Expand Down Expand Up @@ -254,6 +257,13 @@ public static bool IsSdkSupported (DotNetCoreVersion version)
return version >= MinimumSupportedSdkVersion60;
}

if (version.Major == 7) {
return version >= MinimumSupportedSdkVersion70;
}

if (version.Major == 8) {
return version >= MinimumSupportedSdkVersion80;
}


return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ static MSBuildSdks ()
{
TargetRuntime runtime = IdeApp.Preferences.DefaultTargetRuntime;
string binPath = runtime.GetMSBuildBinPath ("15.0");
if (binPath != null) {
string sdksPath = Path.Combine(binPath, "Sdks");
if (Directory.Exists(sdksPath)) {
Installed = true;
MSBuildSDKsPath = sdksPath;
if (binPath != null) {
string sdksPath = Path.Combine(binPath, "Sdks");

if (Directory.Exists(sdksPath)) {
Installed = true;
MSBuildSDKsPath = sdksPath;
}
}
}
Expand Down
Loading
Loading