Skip to content

Commit

Permalink
Bump version to v3.6.0
Browse files Browse the repository at this point in the history
* Update package references (now using Piranha CMS v10.4.0
* _Layout.cshtml: <meta name="generator">
* _Layout.cshtml: embed top level menu into <div role="menu">
* Update NLog configuration from obsolete methods
  • Loading branch information
axunonb committed Jan 9, 2024
1 parent 4b294eb commit 717828a
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 31 deletions.
43 changes: 23 additions & 20 deletions ClubSite/ClubSite.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
<Version>3.5.4</Version>
<Version>3.6.0</Version>
<Authors>axuno gGmbH</Authors>
<Description>The source code for https://www.volleyballclub.de/</Description>
<CurrentYear>$([System.DateTime]::Now.ToString(yyyy))</CurrentYear>
Expand All @@ -13,28 +13,31 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="EPPlus" Version="6.2.4" />
<PackageReference Include="MailKit" Version="4.0.0" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.5">
<PackageReference Include="Azure.Identity" Version="1.10.4" />
<PackageReference Include="EPPlus" Version="7.0.5" />
<PackageReference Include="MailKit" Version="4.3.0" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.1.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.14">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.10" />
<PackageReference Include="NLog.Web.AspNetCore" Version="5.2.3" />
<PackageReference Include="Piranha" Version="10.3.0" />
<PackageReference Include="Piranha.AspNetCore" Version="10.3.0" />
<PackageReference Include="Piranha.AspNetCore.Identity" Version="10.3.0" />
<PackageReference Include="Piranha.AspNetCore.Identity.SQLServer" Version="10.3.0" />
<PackageReference Include="Piranha.AspNetCore.SimpleSecurity" Version="10.3.0" />
<PackageReference Include="Piranha.AttributeBuilder" Version="10.3.0" />
<PackageReference Include="Piranha.Data.EF.SQLServer" Version="10.3.0" />
<PackageReference Include="Piranha.ImageSharp" Version="10.3.0" />
<PackageReference Include="Piranha.Local.FileStorage" Version="10.3.0" />
<PackageReference Include="Piranha.Manager" Version="10.3.0" />
<PackageReference Include="Piranha.Manager.TinyMCE" Version="10.3.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.16" />
<PackageReference Include="NLog.Web.AspNetCore" Version="5.3.8" />
<PackageReference Include="Piranha" Version="10.4.0" />
<PackageReference Include="Piranha.AspNetCore" Version="10.4.0" />
<PackageReference Include="Piranha.AspNetCore.Identity" Version="10.4.0" />
<PackageReference Include="Piranha.AspNetCore.Identity.SQLServer" Version="10.4.0" />
<PackageReference Include="Piranha.AspNetCore.SimpleSecurity" Version="10.4.0" />
<PackageReference Include="Piranha.AttributeBuilder" Version="10.4.0" />
<PackageReference Include="Piranha.Data.EF.SQLServer" Version="10.4.0" />
<PackageReference Include="Piranha.ImageSharp" Version="10.4.0" />
<PackageReference Include="Piranha.Local.FileStorage" Version="10.4.0" />
<PackageReference Include="Piranha.Manager" Version="10.4.0" />
<PackageReference Include="Piranha.Manager.TinyMCE" Version="10.4.0" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
</ItemGroup>

<ItemGroup>
Expand Down
9 changes: 5 additions & 4 deletions ClubSite/Pages/_Layout.cshtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@using Microsoft.AspNetCore.Hosting
@using ClubSite
@using Microsoft.AspNetCore.Hosting
@using Microsoft.Extensions.Hosting
@inject IWebHostEnvironment Env
<!doctype html>
Expand All @@ -20,7 +21,7 @@
<meta name="apple-mobile-web-app-title" content="Volleyballclub Neusäß">
<meta name="application-name" content="Volleyballclub Neusäß">
<!-- favicon [end] -->
<meta name="generator" value="axuno piranha cms https://axuno.net (clubsite: @Piranha.Utils.GetAssemblyVersion(typeof(Program).Assembly), piranha: @Piranha.Utils.GetAssemblyVersion(typeof(Piranha.App).Assembly))" />
<meta name="generator" content="axuno piranha cms https://axuno.net (clubsite: @Piranha.Utils.GetAssemblyVersion(typeof(Program).Assembly), piranha: @Piranha.Utils.GetAssemblyVersion(typeof(Piranha.App).Assembly))" />
@await RenderSectionAsync("head", false)
<link rel="stylesheet" href="~/assets/css/bootstrap.min.css" asp-append-version="true">
<link rel="stylesheet" href="~/assets/fonts/fonts-lato-raleway.css">
Expand All @@ -30,9 +31,9 @@
</head>
<body>
<div class="container-fluid main p-0 mb-2">
<menu>
<div class="mb-3" role="menu">
<partial name="_MenuTopLevel.cshtml" />
</menu>
</div>
@RenderBody()
<partial name="_Footer.cshtml" />
</div>
Expand Down
17 changes: 10 additions & 7 deletions ClubSite/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using NLog;
using NLog.Extensions.Logging;
using NLog.Web;


namespace ClubSite;

Expand All @@ -29,12 +30,13 @@ public static async Task Main(string[] args)
{
// NLog: setup the logger first to catch all errors
var currentDir = Directory.GetCurrentDirectory();
var logger = NLogBuilder
.ConfigureNLog($@"{currentDir}{Path.DirectorySeparatorChar}{ConfigurationFolder}{Path.DirectorySeparatorChar}NLog.Internal.config")

var logger = LogManager.Setup()
.LoadConfigurationFromFile($"{currentDir}{Path.DirectorySeparatorChar}{ConfigurationFolder}{Path.DirectorySeparatorChar}NLog.Internal.config")
.GetCurrentClassLogger();

// Allows for <target name="file" xsi:type="File" fileName = "${var:logDirectory}logfile.log"... >
NLog.LogManager.Configuration.Variables["logDirectory"] = $"{currentDir}{Path.DirectorySeparatorChar}";
LogManager.Configuration.Variables["logDirectory"] = $"{currentDir}{Path.DirectorySeparatorChar}";

try
{
Expand All @@ -47,9 +49,10 @@ public static async Task Main(string[] args)
builder.Logging.ClearProviders();
// Enable NLog as logging provider for Microsoft.Extension.Logging
builder.Logging.AddNLog(loggingConfig);
NLogBuilder.ConfigureNLog(Path.Combine(builder.Environment.ContentRootPath, ConfigurationFolder,
$"NLog.{builder.Environment.EnvironmentName}.config"));

LogManager.Setup()
.LoadConfigurationFromFile(Path.Combine(builder.Environment.ContentRootPath, ConfigurationFolder,
$"NLog.{builder.Environment.EnvironmentName}.config"));

builder.WebHost.ConfigureServices(WebAppStartup.ConfigureServices);

var app = builder.Build();
Expand Down

0 comments on commit 717828a

Please sign in to comment.