Skip to content

Commit

Permalink
Merge pull request #65 from rbergen/dotnet8-upgrade
Browse files Browse the repository at this point in the history
Upgrade to .NET 8
  • Loading branch information
rbergen authored Dec 6, 2023
2 parents 25ae22e + e125935 commit 9c3ea20
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 95 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Deploy to GitHub Pages

on:
push:
branches:
branches:
- main

jobs:
Expand All @@ -12,21 +12,21 @@ jobs:
steps:

- uses: actions/checkout@v3

- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
dotnet-version: 8.0.x

- name: Install wasm-tools for AOT compilation
run: dotnet workload install wasm-tools-net6
run: dotnet workload install wasm-tools

- name: Publish Frontend project
run: dotnet publish src/Frontend/Frontend.csproj -c Release -o release --nologo

- name: Change base-tag in index.html from / to PrimeView
run: sed -i 's/<base href="\/" \/>/<base href="\/PrimeView\/" \/>/g' release/wwwroot/index.html

- name: Copy index.html to 404.html
run: cp release/wwwroot/index.html release/wwwroot/404.html

Expand All @@ -35,10 +35,9 @@ jobs:

- name: Add .nojekyll file
run: touch release/wwwroot/.nojekyll

- name: Commit wwwroot to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: pages
FOLDER: release/wwwroot
branch: pages
folder: release/wwwroot
4 changes: 2 additions & 2 deletions PrimeView.sln
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.1.32210.238
Expand All @@ -15,7 +15,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
README.md = README.md
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RestAPIReader", "src\RestAPIReader\RestAPIReader.csproj", "{7EF46961-0D84-478F-B887-182AA02ECE59}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RestAPIReader", "src\RestAPIReader\RestAPIReader.csproj", "{7EF46961-0D84-478F-B887-182AA02ECE59}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
21 changes: 9 additions & 12 deletions src/Entities/Entities.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<RootNamespace>PrimeView.Entities</RootNamespace>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="EPPlus" Version="6.0.6" />
</ItemGroup>

</Project>
<PropertyGroup>
<RootNamespace>PrimeView.Entities</RootNamespace>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="EPPlus" Version="7.0.3" />
</ItemGroup>
</Project>
45 changes: 20 additions & 25 deletions src/Frontend/Frontend.csproj
Original file line number Diff line number Diff line change
@@ -1,26 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<RootNamespace>PrimeView.Frontend</RootNamespace>
<TargetFramework>net6.0</TargetFramework>
<RunAOTCompilation>true</RunAOTCompilation>
</PropertyGroup>

<ItemGroup>
<None Include="..\.editorconfig" Link=".editorconfig" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Blazored.LocalStorage" Version="4.1.5" />
<PackageReference Include="BlazorTable" Version="1.17.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="2.2.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\JsonFileReader\JsonFileReader.csproj" />
<ProjectReference Include="..\RestAPIReader\RestAPIReader.csproj" />
</ItemGroup>

</Project>
<PropertyGroup>
<RootNamespace>PrimeView.Frontend</RootNamespace>
<TargetFramework>net8.0</TargetFramework>
<RunAOTCompilation>true</RunAOTCompilation>
</PropertyGroup>
<ItemGroup>
<None Include="..\.editorconfig" Link=".editorconfig" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Blazored.LocalStorage" Version="4.4.0" />
<PackageReference Include="BlazorTable" Version="1.17.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\JsonFileReader\JsonFileReader.csproj" />
<ProjectReference Include="..\RestAPIReader\RestAPIReader.csproj" />
</ItemGroup>
</Project>
37 changes: 16 additions & 21 deletions src/JsonFileReader/JsonFileReader.csproj
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<RootNamespace>PrimeView.JsonFileReader</RootNamespace>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<None Include="..\.editorconfig" Link=".editorconfig" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="microsoft.extensions.configuration.binder" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Entities\Entities.csproj" />
</ItemGroup>

</Project>
<PropertyGroup>
<RootNamespace>PrimeView.JsonFileReader</RootNamespace>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<None Include="..\.editorconfig" Link=".editorconfig" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Entities\Entities.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="microsoft.extensions.configuration.binder" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion src/JsonFileReader/ReportReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class ReportReader : IReportReader

public ReportReader(string baseAddress, IConfiguration configuration)
{
this.httpClient = new HttpClient { BaseAddress = new Uri(configuration.GetValue(Constants.BaseURI, baseAddress)) };
this.httpClient = new HttpClient { BaseAddress = new Uri(configuration.GetValue(Constants.BaseURI, baseAddress) ?? baseAddress) };
this.indexFileName = configuration.GetValue<string?>(Constants.Index, null);
this.isS3Bucket = configuration.GetValue(Constants.IsS3Bucket, false);
}
Expand Down
39 changes: 15 additions & 24 deletions src/RestAPIReader/RestAPIReader.csproj
Original file line number Diff line number Diff line change
@@ -1,38 +1,29 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<RootNamespace>PrimeView.RestAPIReader</RootNamespace>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>PrimeView.RestAPIReader</RootNamespace>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<None Include="..\.editorconfig" Link=".editorconfig" />
<None Include="..\.editorconfig" Link=".editorconfig" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.ApiDescription.Client" Version="6.0.7">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="microsoft.extensions.configuration.binder" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="NSwag.ApiDescription.Client" Version="13.0.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="NSwag.ApiDescription.Client" Version="13.20.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.ApiDescription.Client" Version="8.0.0" />
<PackageReference Include="microsoft.extensions.configuration.binder" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Entities\Entities.csproj" />
<ProjectReference Include="..\Entities\Entities.csproj" />
</ItemGroup>

<ItemGroup>
<OpenApiReference Include="OpenAPIs\v1.json" CodeGenerator="NSwagCSharp" Namespace="PrimeView.RestAPIReader.Service" ClassName="PrimesAPI">
<SourceUri>https://primes.marghidanu.com/v1</SourceUri>
</OpenApiReference>
</ItemGroup>

</Project>
</Project>

0 comments on commit 9c3ea20

Please sign in to comment.