懒得勤快 6 years ago
parent
commit
2fce59adfe

+ 1 - 1
NetCoreTest/NetCoreTest.csproj

@@ -1,7 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk.Web">
 
   <PropertyGroup>
-    <TargetFramework>netcoreapp2.1</TargetFramework>
+    <TargetFramework>netcoreapp2.2</TargetFramework>
   </PropertyGroup>
 
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">

+ 1 - 1
NetCoreTest/Program.cs

@@ -9,7 +9,7 @@ namespace NetCoreTest
     {
         public static void Main(string[] args)
         {
-            Console.WriteLine(SystemInfo.CpuLoad);
+            Console.WriteLine((long)SystemInfo.GetRamInfo().MemoryAvailable);
             CreateWebHostBuilder(args).Build().Run();
         }
 

+ 5 - 1
NetCoreTest/Properties/PublishProfiles/FolderProfile.pubxml

@@ -14,6 +14,10 @@
     <ExcludeApp_Data>False</ExcludeApp_Data>
     <ProjectGuid>abec3f65-6556-44fd-bece-33f7927fb3ae</ProjectGuid>
     <publishUrl>bin\Release\netcoreapp2.1\publish\</publishUrl>
-    <DeleteExistingFiles>False</DeleteExistingFiles>
+    <DeleteExistingFiles>True</DeleteExistingFiles>
+    <TargetFramework>netcoreapp2.2</TargetFramework>
+    <RuntimeIdentifier>win-x64</RuntimeIdentifier>
+    <SelfContained>false</SelfContained>
+    <_IsPortable>true</_IsPortable>
   </PropertyGroup>
 </Project>

+ 2 - 2
NetCoreTest/Startup.cs

@@ -1,4 +1,4 @@
-using Masuit.Tools.Core.Net;
+using Masuit.Tools.Core.AspNetCore;
 using Microsoft.AspNetCore.Builder;
 using Microsoft.AspNetCore.Hosting;
 using Microsoft.AspNetCore.Mvc;
@@ -20,7 +20,7 @@ namespace NetCoreTest
         public void ConfigureServices(IServiceCollection services)
         {
             services.AddStaticHttpContext();
-            services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
+            services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
         }
 
         // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.