Skip to content
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

Upgraded to .NET 8, removed .NET 6.0, added .NET 9 support #86

Open
wants to merge 1 commit into
base: develop
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
4 changes: 2 additions & 2 deletions .github/workflows/web-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
with:
fetch-depth: 0

# sets up .NET 6
# sets up .NET 8
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
dotnet-version: 8.0.x

# publishes Blazor project to the release-folder
- name: Publish .NET Core Project
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PackageReference>
</ItemGroup>
<PropertyGroup>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
15 changes: 7 additions & 8 deletions build/Build.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
using System.Collections.Generic;
using System.Runtime.InteropServices;
using Nuke.Common.CI.GitHubActions;
using Nuke.Common;
using Nuke.Common.CI;
using Nuke.Common.CI.GitHubActions;
using Nuke.Common.Git;
using Nuke.Common.IO;
using Nuke.Common.ProjectModel;
using Nuke.Common.Utilities.Collections;
using Nuke.Common;
using Nuke.Common.Tooling;
using Nuke.Common.Tools.ReportGenerator;
using Nuke.Common.Utilities.Collections;
using Nuke.Components;

[GitHubActions(
Expand All @@ -21,7 +20,7 @@
PublishArtifacts = true,
InvokedTargets = new[] { nameof(ITest.Test), nameof(IReportCoverage.ReportCoverage), nameof(IPack.Pack) },
CacheKeyFiles = new[] { "global.json", "**/*.csproj" },
ImportSecrets = new [] { nameof(IReportCoverage.CodecovToken) },
ImportSecrets = new[] { nameof(IReportCoverage.CodecovToken) },
EnableGitHubToken = true)]
[GitHubActions(
"continuous",
Expand All @@ -31,7 +30,7 @@
PublishArtifacts = true,
InvokedTargets = new[] { nameof(IReportCoverage.ReportCoverage), nameof(IPublish.Publish) },
CacheKeyFiles = new[] { "global.json", "**/*.csproj" },
ImportSecrets = new [] { nameof(PublicNuGetApiKey) },
ImportSecrets = new[] { nameof(PublicNuGetApiKey) },
EnableGitHubToken = true)]
class Build : NukeBuild,
IHazChangelog,
Expand Down Expand Up @@ -79,7 +78,7 @@ class Build : NukeBuild,
public bool CreateCoverageHtmlReport => true;
public bool ReportToCodecov => false; // TODO: #74 RuntimeInformation.IsOSPlatform(OSPlatform.Windows);

public Configure<ReportGeneratorSettings> ReportGeneratorSettings => x => x.SetFramework("net6.0");
public Configure<ReportGeneratorSettings> ReportGeneratorSettings => x => x.SetFramework("net8.0");

string PublicNuGetSource => "https://api.nuget.org/v3/index.json";

Expand All @@ -88,7 +87,7 @@ class Build : NukeBuild,
: null;


[Parameter] [Secret] readonly string PublicNuGetApiKey;
[Parameter][Secret] readonly string PublicNuGetApiKey;

bool IsOriginalRepository => GitRepository.Identifier == "kthompson/glob";
string IPublish.NuGetApiKey => GitRepository.IsOnMainBranch() ? PublicNuGetApiKey : GitHubActions.Token;
Expand Down
10 changes: 5 additions & 5 deletions build/_build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<RootNamespace></RootNamespace>
<NoWarn>CS0649;CS0169</NoWarn>
<NukeRootDirectory>..</NukeRootDirectory>
Expand All @@ -11,13 +11,13 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="GitHubActionsTestLogger" Version="2.0.1">
<PackageReference Include="GitHubActionsTestLogger" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Nuke.Common" Version="8.0.0" />
<PackageReference Include="Nuke.Components" Version="8.0.0" />
<PackageReference Include="Nuke.GitHub" Version="5.0.1" />
<PackageReference Include="Nuke.Common" Version="9.0.3" />
<PackageReference Include="Nuke.Components" Version="9.0.3" />
<PackageReference Include="Nuke.GitHub" Version="7.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
5 changes: 5 additions & 0 deletions src/Glob/Glob.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<RootNamespace>GlobExpressions</RootNamespace>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
Expand All @@ -58,4 +59,8 @@
<Folder Include="Text" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Nerdbank.GitVersioning" Version="3.7.112" />
</ItemGroup>

</Project>
17 changes: 13 additions & 4 deletions src/GlobApp/GlobApp.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="5.0.8" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="5.0.8" PrivateAssets="all" />
<PackageReference Include="System.Net.Http.Json" Version="5.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.11" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.11" PrivateAssets="all" />
<PackageReference Include="System.Net.Http.Json" Version="9.0.0" />
</ItemGroup>

<ItemGroup>
Expand All @@ -15,4 +20,8 @@
<Link>README.md</Link>
</Content>
</ItemGroup>

<ItemGroup>
<PackageReference Update="Nerdbank.GitVersioning" Version="3.7.112" />
</ItemGroup>
</Project>
23 changes: 8 additions & 15 deletions src/GlobApp/Program.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
using System;
using System.Net.Http;
using System.Threading.Tasks;
using GlobApp;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.Extensions.DependencyInjection;

namespace GlobApp;

public class Program
{
public static async Task Main(string[] args)
{
var builder = WebAssemblyHostBuilder.CreateDefault(args);
var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("#app");
builder.RootComponents.Add<HeadOutlet>("head::after");

builder.RootComponents.Add<App>("app");
builder.Services.AddScoped(sp => new HttpClient {BaseAddress = new Uri(builder.HostEnvironment.BaseAddress)});
await builder.Build().RunAsync();
}
}
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });

await builder.Build().RunAsync();
62 changes: 37 additions & 25 deletions src/GlobApp/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,41 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:57268",
"sslPort": 44341
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:15349",
"sslPort": 44359
}
},
"GlobApp": {
"commandName": "Project",
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"applicationUrl": "http://localhost:5256",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"applicationUrl": "https://localhost:7178;http://localhost:5256",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
}
Loading