File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
22 <PropertyGroup >
3- <TargetFramework >net6 .0</TargetFramework >
3+ <TargetFramework >net9 .0</TargetFramework >
44 <IsPackable >false</IsPackable >
55 </PropertyGroup >
66 <ItemGroup >
7- <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 17.2 .0" />
8- <PackageReference Include =" MSTest.TestAdapter" Version =" 2.2.10 " />
9- <PackageReference Include =" MSTest.TestFramework" Version =" 2.2.10 " />
7+ <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 17.12 .0" />
8+ <PackageReference Include =" MSTest.TestAdapter" Version =" 3.7.0 " />
9+ <PackageReference Include =" MSTest.TestFramework" Version =" 3.7.0 " />
1010 </ItemGroup >
1111 <ItemGroup >
1212 <ProjectReference Include =" ..\DIDemoServices\DIDemoServices.csproj" />
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
22 <PropertyGroup >
3- <TargetFramework >net6 .0</TargetFramework >
3+ <TargetFramework >net9 .0</TargetFramework >
44 <IsPackable >false</IsPackable >
55 </PropertyGroup >
66 <ItemGroup >
7- <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 17.2 .0" />
8- <PackageReference Include =" MSTest.TestAdapter" Version =" 2.2.10 " />
9- <PackageReference Include =" MSTest.TestFramework" Version =" 2.2.10 " />
7+ <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 17.12 .0" />
8+ <PackageReference Include =" MSTest.TestAdapter" Version =" 3.7.0 " />
9+ <PackageReference Include =" MSTest.TestFramework" Version =" 3.7.0 " />
1010 </ItemGroup >
1111 <ItemGroup >
1212 <ProjectReference Include =" ..\DIDemo\DIDemo.csproj" />
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk.Web" >
22 <PropertyGroup >
3- <TargetFramework >net6 .0</TargetFramework >
3+ <TargetFramework >net9 .0</TargetFramework >
44 <AspNetCoreHostingModel >InProcess</AspNetCoreHostingModel >
55 <IncludeOpenAPIAnalyzers >true</IncludeOpenAPIAnalyzers >
66 </PropertyGroup >
77 <ItemGroup >
8- <PackageReference Include =" Microsoft.EntityFrameworkCore.SqlServer" Version =" 6 .0.7 " />
9- <PackageReference Include =" Microsoft.EntityFrameworkCore.Tools" Version =" 6 .0.7 " >
8+ <PackageReference Include =" Microsoft.EntityFrameworkCore.SqlServer" Version =" 9 .0.1 " />
9+ <PackageReference Include =" Microsoft.EntityFrameworkCore.Tools" Version =" 9 .0.1 " >
1010 <PrivateAssets >all</PrivateAssets >
1111 <IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
1212 </PackageReference >
13- <PackageReference Include =" Microsoft.Extensions.DependencyInjection" Version =" 6 .0.0 " />
14- <PackageReference Include =" Microsoft.Extensions.Logging.Debug" Version =" 6 .0.0 " />
15- <PackageReference Include =" Microsoft.VisualStudio.Web.CodeGeneration.Design" Version =" 6 .0.7 " />
16- <PackageReference Include =" Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version =" 6 .0.7 " />
13+ <PackageReference Include =" Microsoft.Extensions.DependencyInjection" Version =" 9 .0.1 " />
14+ <PackageReference Include =" Microsoft.Extensions.Logging.Debug" Version =" 9 .0.1 " />
15+ <PackageReference Include =" Microsoft.VisualStudio.Web.CodeGeneration.Design" Version =" 9 .0.0 " />
16+ <PackageReference Include =" Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version =" 9 .0.1 " />
1717 </ItemGroup >
1818 <ItemGroup >
1919 <ProjectReference Include =" ..\DIDemoServices\DIDemoServices.csproj" />
Original file line number Diff line number Diff line change 1- using System ;
2- using System . Collections . Generic ;
3- using System . IO ;
4- using System . Linq ;
5- using System . Threading . Tasks ;
6- using Microsoft . AspNetCore ;
7- using Microsoft . AspNetCore . Hosting ;
8- using Microsoft . Extensions . Configuration ;
9- using Microsoft . Extensions . Logging ;
1+ using Microsoft . AspNetCore . Hosting ;
2+ using Microsoft . Extensions . Hosting ;
103
114namespace DIDemo
125{
136 public class Program
147 {
158 public static void Main ( string [ ] args )
169 {
17- CreateWebHostBuilder ( args ) . Build ( ) . Run ( ) ;
10+ CreateHostBuilder ( args ) . Build ( ) . Run ( ) ;
1811 }
1912
20- public static IWebHostBuilder CreateWebHostBuilder ( string [ ] args ) =>
21- WebHost . CreateDefaultBuilder ( args )
22- . UseStartup < Startup > ( ) ;
13+ public static IHostBuilder CreateHostBuilder ( string [ ] args ) =>
14+ Host . CreateDefaultBuilder ( args )
15+ . ConfigureWebHostDefaults ( webBuilder =>
16+ {
17+ webBuilder . UseStartup < Startup > ( ) ;
18+ } ) ;
2319 }
2420}
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
22
33 <PropertyGroup >
4- <TargetFramework >net6 .0</TargetFramework >
4+ <TargetFramework >net9 .0</TargetFramework >
55 </PropertyGroup >
66
77 <ItemGroup >
8- <PackageReference Include =" Microsoft.Extensions.Configuration.Abstractions" Version =" 6 .0.0 " />
9- <PackageReference Include =" Newtonsoft.Json" Version =" 13.0.1 " />
8+ <PackageReference Include =" Microsoft.Extensions.Configuration.Abstractions" Version =" 9 .0.1 " />
9+ <PackageReference Include =" Newtonsoft.Json" Version =" 13.0.3 " />
1010 </ItemGroup >
1111
1212</Project >
You can’t perform that action at this time.
0 commit comments