Skip to content

Commit

Permalink
dotnet 8 migration
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyJeanson committed Jul 10, 2024
1 parent e009eca commit 9daa546
Show file tree
Hide file tree
Showing 42 changed files with 972 additions and 2,310 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ This blog engine include many features :
- ... and so many more to document ...

# Tech skills and libraries used
- .net 6.
- .net 8.
- ASP .net MVC.
- TypeScript.
- Azure SQL.
Expand Down
4 changes: 2 additions & 2 deletions Sources/MyBlog.Engine.Data/MyBlog.Engine.Data.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<NeutralLanguage>en-US</NeutralLanguage>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.7" />
<PackageReference Include="SecurityCodeScan.VS2019" Version="5.6.7">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
16 changes: 12 additions & 4 deletions Sources/MyBlog.Engine.Tests/MyBlog.Engine.Tests.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>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand All @@ -17,12 +17,20 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.msbuild" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="xunit" Version="2.9.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
Expand Down
16 changes: 8 additions & 8 deletions Sources/MyBlog.Engine/MyBlog.Engine.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>
<TargetFramework>net8.0</TargetFramework>
<NeutralLanguage>en-US</NeutralLanguage>
</PropertyGroup>

Expand All @@ -12,17 +12,17 @@
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Azure.Storage.Blobs" Version="12.13.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Facebook" Version="6.0.9" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Google" Version="6.0.9" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.MicrosoftAccount" Version="6.0.9" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Twitter" Version="6.0.9" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.Abstractions" Version="6.0.9" />
<PackageReference Include="Azure.Storage.Blobs" Version="12.20.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Facebook" Version="8.0.7" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Google" Version="8.0.7" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.MicrosoftAccount" Version="8.0.7" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Twitter" Version="8.0.7" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.Abstractions" Version="8.0.7" />
<PackageReference Include="SecurityCodeScan.VS2019" Version="5.6.7">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Sendgrid" Version="9.28.1" />
<PackageReference Include="Sendgrid" Version="9.29.3" />
</ItemGroup>

<ItemGroup>
Expand Down
9 changes: 9 additions & 0 deletions Sources/MyBlog.Engine/SetupExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ public static IServiceCollection AddMyBlogEngine(this IServiceCollection service

#endregion

services.AddHealthChecks();

return services;
}

Expand Down Expand Up @@ -178,6 +180,13 @@ public static IApplicationBuilder UseMyBlogEngine(this IApplicationBuilder app)
// XmlRpc + Metaweblog
app.Map("/metaweblog", MetaWeblog.Configure);


app.UseEndpoints(endpoints =>
{
// Heath check
endpoints.MapHealthChecks("/health");
});

return app;
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/MyBlog.Resources/MyBlog.Resources.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<SuppressPseudoWarning Condition="'$(Configuration)' == 'Debug'">true</SuppressPseudoWarning>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<NeutralLanguage>en-US</NeutralLanguage>
<RootNamespace>MyBlog</RootNamespace>
</PropertyGroup>
Expand Down
20 changes: 14 additions & 6 deletions Sources/MyBlog.Tests/MyBlog.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.DataProtection.Abstractions" Version="6.0.9" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="6.0.9" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.msbuild" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.AspNetCore.DataProtection.Abstractions" Version="8.0.7" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.7" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="xunit" Version="2.9.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
Expand Down
7 changes: 5 additions & 2 deletions Sources/MyBlog.sln
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29519.181
# Visual Studio Version 17
VisualStudioVersion = 17.4.33110.190
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Common", "Common", "{21F1F0B6-D974-4241-AB71-F6374BF83158}"
ProjectSection(SolutionItems) = preProject
directory.build.props = directory.build.props
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyLib.Web", "MyLib.Web\MyLib.Web.csproj", "{79A0F744-D088-4DDD-B6DA-6A4F00B37A32}"
EndProject
Expand Down
12 changes: 4 additions & 8 deletions Sources/MyBlog/MyBlog.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@
<SuppressPseudoWarning Condition="'$(Configuration)' == 'Debug'">true</SuppressPseudoWarning>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<NeutralLanguage>en-US</NeutralLanguage>
<AssemblyVersion>6.0.10.0</AssemblyVersion>
<FileVersion>6.0.10.0</FileVersion>
<Version>6.0.10.0</Version>
<TargetFramework>net8.0</TargetFramework>
<NeutralLanguage>en-US</NeutralLanguage>
<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
</PropertyGroup>
<ItemGroup>
Expand All @@ -24,12 +21,11 @@
<None Remove="_www\js\_my.ts" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.TypeScript.MSBuild" Version="4.8.4">
<PackageReference Include="Microsoft.TypeScript.MSBuild" Version="5.5.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="2.2.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.10" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="8.0.3" />
<PackageReference Include="SecurityCodeScan.VS2019" Version="5.6.7">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
1 change: 0 additions & 1 deletion Sources/MyBlog/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
app.UseBrowserLink();
}
else
{
Expand Down
8 changes: 7 additions & 1 deletion Sources/MyBlog/_www/css/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,13 @@ body > header {
}

aside {
#links {
#links {
@include media-breakpoint-up(lg) {
> div > a {
display: flex;
justify-content: center;
}
}
img {
margin-bottom: 10px;
}
Expand Down
1 change: 1 addition & 0 deletions Sources/MyBlog/_www/css/all.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ $link-decoration: none;
// Bootstrap
@import "../../node_modules/bootstrap/scss/functions";
@import "../../node_modules/bootstrap/scss/variables";
@import "../../node_modules/bootstrap/scss/variables-dark";
@import "../../node_modules/bootstrap/scss/maps";
@import "../../node_modules/bootstrap/scss/mixins";
@import "../../node_modules/bootstrap/scss/utilities";
Expand Down
2 changes: 1 addition & 1 deletion Sources/MyBlog/_www/js/Account-Edit.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Sources/MyBlog/_www/js/App.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions Sources/MyBlog/_www/js/External-anchors.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Sources/MyBlog/_www/js/External-anchors.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Sources/MyBlog/_www/js/External-anchors.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Add an icon inside links to external websites
let anchors = document.querySelectorAll("article div.content a") as NodeListOf<HTMLAnchorElement>;
if (anchors) {
anchors.forEach(anchor => {
if (anchor.hostname && anchor.hostname !== location.hostname) {
anchor.innerHTML += " <i class='fa-solid fa-arrow-up-right-from-square fa-2xs'></i>";
}
})
}
2 changes: 1 addition & 1 deletion Sources/MyBlog/_www/js/Get-More-Items.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Sources/MyBlog/_www/js/Post-Details.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9daa546

Please sign in to comment.