diff --git a/DIDemo.Services.Tests/DIDemo.Services.Tests.csproj b/DIDemo.Services.Tests/DIDemo.Services.Tests.csproj index e8b0661..4d0633d 100644 --- a/DIDemo.Services.Tests/DIDemo.Services.Tests.csproj +++ b/DIDemo.Services.Tests/DIDemo.Services.Tests.csproj @@ -1,12 +1,12 @@  - net6.0 + net9.0 false - - - + + + diff --git a/DIDemo.Tests/DIDemo.Tests.csproj b/DIDemo.Tests/DIDemo.Tests.csproj index 44b2f87..ec76df0 100644 --- a/DIDemo.Tests/DIDemo.Tests.csproj +++ b/DIDemo.Tests/DIDemo.Tests.csproj @@ -1,12 +1,12 @@  - net6.0 + net9.0 false - - - + + + diff --git a/DIDemo/DIDemo.csproj b/DIDemo/DIDemo.csproj index 389ac29..07601a7 100644 --- a/DIDemo/DIDemo.csproj +++ b/DIDemo/DIDemo.csproj @@ -1,19 +1,19 @@  - net6.0 + net9.0 InProcess true - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - + + + + diff --git a/DIDemo/Program.cs b/DIDemo/Program.cs index e8bbbb3..9117447 100644 --- a/DIDemo/Program.cs +++ b/DIDemo/Program.cs @@ -1,12 +1,5 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Logging; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Hosting; namespace DIDemo { @@ -14,11 +7,14 @@ public class Program { public static void Main(string[] args) { - CreateWebHostBuilder(args).Build().Run(); + CreateHostBuilder(args).Build().Run(); } - public static IWebHostBuilder CreateWebHostBuilder(string[] args) => - WebHost.CreateDefaultBuilder(args) - .UseStartup(); + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseStartup(); + }); } } diff --git a/DIDemoServices/DIDemoServices.csproj b/DIDemoServices/DIDemoServices.csproj index 1e3a09a..ad2c4c2 100644 --- a/DIDemoServices/DIDemoServices.csproj +++ b/DIDemoServices/DIDemoServices.csproj @@ -1,12 +1,12 @@  - net6.0 + net9.0 - - + +