Skip to content

Commit

Permalink
Adding net7.0 target framework (#260)
Browse files Browse the repository at this point in the history
* Adding net7.0 target framework

* Fixed workflow for codeql
  • Loading branch information
shibayan committed Sep 4, 2023
1 parent 2fa046e commit c9b2b47
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [ master ]

env:
DOTNET_VERSION: 6.0.x
DOTNET_VERSION: 7.0.x

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [ "master" ]

env:
DOTNET_VERSION: 6.0.x
DOTNET_VERSION: 7.0.x

jobs:
analyze:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
tags: [ v* ]

env:
DOTNET_VERSION: 6.0.x
DOTNET_VERSION: 7.0.x

jobs:
publish:
Expand Down
4 changes: 2 additions & 2 deletions Sharprompt.Example/Sharprompt.Example.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>

Expand Down
4 changes: 2 additions & 2 deletions Sharprompt.Tests/Sharprompt.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
4 changes: 4 additions & 0 deletions Sharprompt/Internal/EnumHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ internal static class EnumHelper<TEnum> where TEnum : notnull
{
static EnumHelper()
{
#if NET7_0_OR_GREATER
var values = (TEnum[])Enum.GetValuesAsUnderlyingType(typeof(TEnum));
#else
var values = (TEnum[])Enum.GetValues(typeof(TEnum));
#endif

foreach (var value in values)
{
Expand Down
4 changes: 2 additions & 2 deletions Sharprompt/Sharprompt.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<Nullable>enable</Nullable>
</PropertyGroup>

Expand All @@ -11,7 +11,7 @@
<PackageId>Sharprompt</PackageId>
<PackageIcon>icon.png</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageReleaseNotes>https://github.com/shibayan/Sharprompt/releases</PackageReleaseNotes>
<PackageReleaseNotes>https://github.com/shibayan/Sharprompt/releases/tag/v$(Version)</PackageReleaseNotes>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageTags>cli;command-line;console;interactive;prompt;terminal</PackageTags>
<RepositoryUrl>https://github.com/shibayan/Sharprompt</RepositoryUrl>
Expand Down

0 comments on commit c9b2b47

Please sign in to comment.