Moved to .NET 7

This commit is contained in:
Thorsten Sommer 2023-02-12 14:07:30 +01:00
parent 945a6e303a
commit 9218085e33
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108
6 changed files with 14 additions and 13 deletions

View File

@ -2,19 +2,20 @@
<PropertyGroup> <PropertyGroup>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<LangVersion>default</LangVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.9" /> <PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.9"> <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.2">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.9" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.2" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.1" /> <PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -275,9 +275,9 @@ public sealed class DataContext : DbContext, IDataContext
if(parentId == Guid.Empty) if(parentId == Guid.Empty)
{ {
if(section.Depth != 0) if(section.Depth != 0)
Console.WriteLine(@$"Section {uniqueId} ""{section.Name}"" has no parent."); Console.WriteLine($"""Section {uniqueId} "{section.Name}" has no parent.""");
else else
Console.WriteLine(@$"Section {uniqueId} ""{section.Name}"" is a root section, thus, has no parent."); Console.WriteLine($"""Section {uniqueId} "{section.Name}" is a root section, thus, has no parent.""");
section.Parent = null; section.Parent = null;
continue; continue;
@ -287,7 +287,7 @@ public sealed class DataContext : DbContext, IDataContext
section.Parent = parent.Entity; section.Parent = parent.Entity;
else else
{ {
Console.WriteLine(@$"Parent of section {uniqueId} ""{section.Name}"" was not found."); Console.WriteLine($"""Parent of section {uniqueId} "{section.Name}" was not found.""");
section.Parent = null; section.Parent = null;
continue; continue;
} }

View File

@ -144,7 +144,7 @@ public static class Setup
StartInfo = new() StartInfo = new()
{ {
FileName = "cmd.exe", FileName = "cmd.exe",
Arguments = $@"/C del /Q /F ""{Setup.SETUP_MAINTENANCE.PathToDataFile}""", Arguments = $"""/C del /Q /F "{Setup.SETUP_MAINTENANCE.PathToDataFile}" """,
UseShellExecute = false, UseShellExecute = false,
CreateNoWindow = true, CreateNoWindow = true,
} }

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<LangVersion>default</LangVersion> <LangVersion>default</LangVersion>
@ -12,7 +12,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="DeepL.net" Version="1.4.0" /> <PackageReference Include="DeepL.net" Version="1.6.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -2,5 +2,5 @@
public static class Version public static class Version
{ {
public static string Text => $"v0.8.5 (2023-02-12), .NET {Environment.Version}"; public static string Text => $"v0.8.6 (2023-02-12), .NET {Environment.Version}";
} }

View File

@ -3,7 +3,7 @@
<PropertyGroup> <PropertyGroup>
<OutputType Condition=" '$(Configuration)' == 'Release' ">WinExe</OutputType> <OutputType Condition=" '$(Configuration)' == 'Release' ">WinExe</OutputType>
<OutputType Condition=" '$(Configuration)' == 'Debug' ">Exe</OutputType> <OutputType Condition=" '$(Configuration)' == 'Debug' ">Exe</OutputType>
<TargetFramework>net6.0-windows10.0.22000.0</TargetFramework> <TargetFramework>net7.0-windows</TargetFramework>
<RootNamespace>UI_WinForms</RootNamespace> <RootNamespace>UI_WinForms</RootNamespace>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms> <UseWindowsForms>true</UseWindowsForms>