Upgraded project to .NET 8.0 because .NET 6.0 is out of support

This commit is contained in:
Markus Ewald 2025-06-19 10:44:40 +02:00
parent 0152173106
commit 66a7848d1f
3 changed files with 17 additions and 3 deletions

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net462;net6.0-windows</TargetFrameworks> <TargetFrameworks>net462;net8.0-windows</TargetFrameworks>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression> <PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo> <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateDocumentationFile>True</GenerateDocumentationFile> <GenerateDocumentationFile>True</GenerateDocumentationFile>
@ -26,7 +26,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Nuclex.Windows.Forms\Nuclex.Windows.Forms (net-4.6)(net-6.0).csproj" /> <ProjectReference Include="..\Nuclex.Windows.Forms\Nuclex.Windows.Forms (net-4.6)(net-8.0).csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -19,6 +19,10 @@ limitations under the License.
using System; using System;
#if NET6_0_OR_GREATER
using System.Runtime.Versioning;
#endif
using Ninject; using Ninject;
using Ninject.Activation; using Ninject.Activation;
using Ninject.Modules; using Ninject.Modules;
@ -29,7 +33,10 @@ using Nuclex.Windows.Forms.Messages;
namespace Nuclex.Windows.Forms.Ninject { namespace Nuclex.Windows.Forms.Ninject {
/// <summary>Sets up the service bindings for an MVVM-based WPF application</summary> /// <summary>Sets up the service bindings for an MVVM-based application</summary>
#if NET6_0_OR_GREATER
[SupportedOSPlatform("windows")]
#endif
public class MvvmModule : NinjectModule { public class MvvmModule : NinjectModule {
/// <summary>Called when the module is loaded into the kernel</summary> /// <summary>Called when the module is loaded into the kernel</summary>

View File

@ -19,6 +19,10 @@ limitations under the License.
using System; using System;
#if NET6_0_OR_GREATER
using System.Runtime.Versioning;
#endif
using Ninject; using Ninject;
using Nuclex.Windows.Forms.AutoBinding; using Nuclex.Windows.Forms.AutoBinding;
@ -26,6 +30,9 @@ using Nuclex.Windows.Forms.AutoBinding;
namespace Nuclex.Windows.Forms.Ninject { namespace Nuclex.Windows.Forms.Ninject {
/// <summary>Window manager that is using Ninject</summary> /// <summary>Window manager that is using Ninject</summary>
#if NET6_0_OR_GREATER
[SupportedOSPlatform("windows")]
#endif
public class NinjectWindowManager : WindowManager { public class NinjectWindowManager : WindowManager {
/// <summary>Initializes a new window manager</summary> /// <summary>Initializes a new window manager</summary>