–Upgrade to .NET 11
Test / Run tests (push) Successful in 2m45s

This commit is contained in:
lorenz.stechauner committed 2026-11-12 10:58:05 +01:00
1 parent 2406f58a91
commit 9e110a467a
9 files changed
+70 -70

No files matched your search

+11 -11
View File
@@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net10.0-windows</TargetFramework>
<TargetFramework>net11.0-windows</TargetFramework>
<PlatformTarget>x64</PlatformTarget>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
@@ -23,21 +23,21 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="bblanchon.PDFium.Win32" Version="157.0.8086" />
<PackageReference Include="bblanchon.PDFium.Win32" Version="159.0.8152" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.2" />
<PackageReference Include="itext" Version="9.8.0" />
<PackageReference Include="itext.bouncy-castle-adapter" Version="9.8.0" />
<PackageReference Include="LinqKit" Version="1.4.0" />
<PackageReference Include="MailKit" Version="4.18.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.12" />
<PackageReference Include="Microsoft.Extensions.Configuration.Ini" Version="10.0.12" />
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.4258.31" />
<PackageReference Include="NJsonSchema" Version="11.6.1" />
<PackageReference Include="LinqKit" Version="1.4.1" />
<PackageReference Include="MailKit" Version="5.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="11.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Ini" Version="11.0.0" />
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.4314.35" />
<PackageReference Include="NJsonSchema" Version="11.6.2" />
<PackageReference Include="ScottPlot.WPF" Version="5.1.59" />
<PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" Version="3.0.5" />
<PackageReference Include="System.IO.Hashing" Version="10.0.12" />
<PackageReference Include="System.IO.Ports" Version="10.0.12" />
<PackageReference Include="System.Management" Version="10.0.12" />
<PackageReference Include="System.IO.Hashing" Version="11.0.0" />
<PackageReference Include="System.IO.Ports" Version="11.0.0" />
<PackageReference Include="System.Management" Version="11.0.0" />
</ItemGroup>
</Project>
+8 -8
View File
@@ -251,23 +251,23 @@ namespace Elwig.Helpers.Billing {
try {
return new JsonObject() {
["15kmw"] = Math.Round(y.Distinct().Single(), prec)
["15kmw"] = Math.Round((decimal)y.Distinct().Single(), prec)
};
} catch { }
var data = new JsonObject();
if (y[0] != y[1]) {
data[$"{x[0]}{mode}"] = Math.Round(y[0], prec);
data[$"{x[0]}{mode}"] = Math.Round((decimal)y[0], prec);
}
for (int i = 1; i < x.Length - 1; i++) {
var d1 = Math.Round(y[i] - y[i - 1], prec);
var d2 = Math.Round(y[i + 1] - y[i], prec);
var d1 = Math.Round((decimal)(y[i] - y[i - 1]), prec);
var d2 = Math.Round((decimal)(y[i + 1] - y[i]), prec);
if (d1 != d2) {
data[$"{x[i]}{mode}"] = Math.Round(y[i], prec);
data[$"{x[i]}{mode}"] = Math.Round((decimal)y[i], prec);
}
}
if (y[^1] != y[^2]) {
data[$"{x[^1]}{mode}"] = Math.Round(y[^1], prec);
data[$"{x[^1]}{mode}"] = Math.Round((decimal)y[^1], prec);
}
return data;
}
@@ -275,7 +275,7 @@ namespace Elwig.Helpers.Billing {
protected static JsonNode GraphEntryToJson(GraphEntry entry) {
try {
if (entry.ContractedFlatBonus == null) {
return JsonValue.Create((decimal)entry.DataGraph.DataY.Distinct().Single());
return JsonValue.Create(Math.Round((decimal)entry.DataGraph.DataY.Distinct().Single(), entry.DataGraph.Precision));
}
} catch { }
@@ -287,7 +287,7 @@ namespace Elwig.Helpers.Billing {
curve["data"] = GraphToJson(entry.DataGraph, entry.Mode.ToString().ToLower());
if (entry.ContractedFlatBonus != null) {
curve["ctrd"] = (decimal)entry.ContractedFlatBonus;
curve["ctrd"] = Math.Round((decimal)entry.ContractedFlatBonus, entry.ContractedGraph?.Precision ?? entry.DataGraph.Precision);
} else if (entry.ContractedGraph != null) {
curve["ctrd"] = GraphToJson(entry.ContractedGraph, entry.Mode.ToString().ToLower());
}
+1 -1
View File
@@ -579,7 +579,7 @@ namespace Elwig.Helpers {
body.Add(doc.AsEmailAttachment($"{name}.pdf"));
}
msg.Body = body;
await client!.SendAsync(msg);
await client!.SendAsync(new SmtpSendRequest(msg));
await AddSentMails([(
"email", member.MgNr, member.AdministrativeName,
member.EmailAddresses.OrderBy(a => a.Nr).Select(a => a.Address).ToArray(),
@@ -9,7 +9,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<PublishDir>bin\Publish</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<TargetFramework>net10.0-windows</TargetFramework>
<TargetFramework>net11.0-windows</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishSingleFile>false</PublishSingleFile>
+1 -1
View File
@@ -954,7 +954,7 @@ namespace Elwig.Windows {
body.Add(doc.AsEmailAttachment($"{name}.pdf"));
}
msg.Body = body;
await client!.SendAsync(msg);
await client!.SendAsync(new SmtpSendRequest(msg));
await Utils.AddSentMails([(
"email", m.MgNr, m.AdministrativeName,
m.EmailAddresses.OrderBy(a => a.Nr).Select(a => a.Address).ToArray(),
+2 -2
View File
@@ -14,7 +14,7 @@
</Target>
<ItemGroup>
<ProjectReference Include="..\Installer\Installer.wixproj" />
<PackageReference Include="WixToolset.Bal.wixext" Version="7.0.0" />
<PackageReference Include="WixToolset.Util.wixext" Version="7.0.0" />
<PackageReference Include="WixToolset.Bal.wixext" Version="7.0.1" />
<PackageReference Include="WixToolset.Util.wixext" Version="7.0.1" />
</ItemGroup>
</Project>
+1 -1
View File
@@ -6,7 +6,7 @@ namespace Tests.E2ETests {
public const int WINDOW_OPEN_SLEEP = 2000;
public static readonly string ApplicationPath = Path.GetFullPath(@"..\..\..\..\Elwig\bin\Debug\net10.0-windows\Elwig.exe");
public static readonly string ApplicationPath = Path.GetFullPath(@"..\..\..\..\Elwig\bin\Debug\net11.0-windows\Elwig.exe");
public static readonly string ConfigPath = Path.GetFullPath(@"..\..\..\..\Tests\config.test.ini");
public static readonly string TestDatabasePath = Path.GetFullPath(@"..\..\..\..\Tests\ElwigTestDB.sqlite3");
+3 -3
View File
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0-windows</TargetFramework>
<TargetFramework>net11.0-windows</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
@@ -19,11 +19,11 @@
</Target>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.10.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.12.0" />
<PackageReference Include="Appium.WebDriver" Version="4.4.5" />
<PackageReference Include="NReco.PdfRenderer" Version="1.6.0" />
<PackageReference Include="NUnit" Version="5.0.0" />
<PackageReference Include="NUnit3TestAdapter" Version="6.3.0" />
<PackageReference Include="NUnit3TestAdapter" Version="6.3.1" />
<PackageReference Include="NUnit.Analyzers" Version="4.15.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
+42 -42
View File
@@ -545,8 +545,8 @@ namespace Tests.UnitTests.HelperTests {
"id": 2,
"mode": "oe",
"data": {
"73oe": 0.65,
"84oe": 1.2
"73oe": 0.6500,
"84oe": 1.2000
}
}
]
@@ -593,8 +593,8 @@ namespace Tests.UnitTests.HelperTests {
"id": 2,
"mode": "oe",
"data": {
"73oe": 0.65,
"84oe": 1.2
"73oe": 0.6500,
"84oe": 1.2000
}
}
]
@@ -624,14 +624,14 @@ namespace Tests.UnitTests.HelperTests {
"payment": {
"GV": "curve:1",
"ZW": 0.75,
"BP": 0.8
"BP": 0.8000
},
"curves": [
{
"id": 1,
"mode": "oe",
"data": {
"73oe": 0.6,
"73oe": 0.6000,
"84oe": 1
}
}
@@ -660,7 +660,7 @@ namespace Tests.UnitTests.HelperTests {
"mode": "elwig",
"version": 1,
"payment": {
"default": 0.8,
"default": 0.8000,
"GV": "curve:1",
"GV-B": "curve:1",
"-B": 0.75
@@ -670,7 +670,7 @@ namespace Tests.UnitTests.HelperTests {
"id": 1,
"mode": "oe",
"data": {
"73oe": 0.6,
"73oe": 0.6000,
"84oe": 1
}
}
@@ -702,9 +702,9 @@ namespace Tests.UnitTests.HelperTests {
"version": 1,
"payment": {
"default": 0.75,
"/S": 0.3,
"/S-B": 0.4,
"-B": 0.2
"/S": 0.3000,
"/S-B": 0.4000,
"-B": 0.2000
},
"curves": []
}
@@ -727,9 +727,9 @@ namespace Tests.UnitTests.HelperTests {
{
"mode": "elwig",
"version": 1,
"payment": 0.2,
"payment": 0.2000,
"quality": {
"WEI": 0.1
"WEI": 0.1000
},
"curves": []
}
@@ -752,8 +752,8 @@ namespace Tests.UnitTests.HelperTests {
"mode": "elwig",
"version": 1,
"payment": {
"default": 0.1,
"GV-B": 0.2
"default": 0.1000,
"GV-B": 0.2000
},
"curves": []
}
@@ -779,11 +779,11 @@ namespace Tests.UnitTests.HelperTests {
"mode": "elwig",
"version": 1,
"payment": {
"default": 0.1,
"GV-B": 0.2,
"FV-B": 0.2,
"ZW-B": 0.3,
"WR-B": 0.3
"default": 0.1000,
"GV-B": 0.2000,
"FV-B": 0.2000,
"ZW-B": 0.3000,
"WR-B": 0.3000
},
"curves": []
}
@@ -806,8 +806,8 @@ namespace Tests.UnitTests.HelperTests {
"mode": "elwig",
"version": 1,
"payment": {
"default": 0.1,
"WR-B": 0.2
"default": 0.1000,
"WR-B": 0.2000
},
"curves": []
}
@@ -830,9 +830,9 @@ namespace Tests.UnitTests.HelperTests {
"mode": "elwig",
"version": 1,
"payment": {
"default": 0.1,
"-B": 0.2,
"GV-B": 0.1
"default": 0.1000,
"-B": 0.2000,
"GV-B": 0.1000
},
"curves": []
}
@@ -858,11 +858,11 @@ namespace Tests.UnitTests.HelperTests {
"mode": "elwig",
"version": 1,
"payment": {
"GV/S-B": 0.2,
"/S": 0.2,
"/S-B": 0.3,
"GV": 0.1,
"ZW": 0.1
"GV/S-B": 0.2000,
"/S": 0.2000,
"/S-B": 0.3000,
"GV": 0.1000,
"ZW": 0.1000
},
"curves": []
}
@@ -886,9 +886,9 @@ namespace Tests.UnitTests.HelperTests {
"mode": "elwig",
"version": 1,
"payment": {
"default": 0.1,
"RR-B": 0.1,
"RR": 0.2
"default": 0.1000,
"RR-B": 0.1000,
"RR": 0.2000
},
"curves": []
}
@@ -914,10 +914,10 @@ namespace Tests.UnitTests.HelperTests {
"mode": "elwig",
"version": 1,
"payment": {
"RR/K-B": 0.2,
"RR/K": 0.3,
"default": 0.1,
"/K": 0.2
"RR/K-B": 0.2000,
"RR/K": 0.3000,
"default": 0.1000,
"/K": 0.2000
},
"curves": []
}
@@ -940,8 +940,8 @@ namespace Tests.UnitTests.HelperTests {
"mode": "elwig",
"version": 1,
"payment": {
"WR/S": 0.2,
"default": 0.1
"WR/S": 0.2000,
"default": 0.1000
},
"curves": []
}
@@ -964,9 +964,9 @@ namespace Tests.UnitTests.HelperTests {
"mode": "elwig",
"version": 1,
"payment": {
"default": 0.1,
"/S": 0.2,
"GV/S": 0.1
"default": 0.1000,
"/S": 0.2000,
"GV/S": 0.1000
},
"curves": []
}