Browse Source

ConnectionStat: add net7 for build single file

HOME 1 year ago
parent
commit
b81a2a7442

+ 8 - 0
ConnectionStat/ConnectionStat-net7.csproj

@@ -0,0 +1,8 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+  <PropertyGroup>
+    <OutputType>Exe</OutputType>
+    <TargetFrameworks>net7.0</TargetFrameworks>
+  </PropertyGroup>
+
+</Project>

+ 3 - 1
ConnectionStat/ConnectionStat.csproj

@@ -9,11 +9,12 @@
     <OutputType>Exe</OutputType>
     <RootNamespace>ConnectionStat</RootNamespace>
     <AssemblyName>ConnectionStat</AssemblyName>
-    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
     <Deterministic>true</Deterministic>
     <NuGetPackageImportStamp>
     </NuGetPackageImportStamp>
+    <TargetFrameworkProfile />
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <PlatformTarget>AnyCPU</PlatformTarget>
@@ -47,6 +48,7 @@
     <Folder Include="Properties\" />
   </ItemGroup>
   <ItemGroup>
+    <None Include="app.config" />
     <None Include="packages.config" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

+ 11 - 11
ConnectionStat/Program.cs

@@ -4,16 +4,16 @@ using System.Linq;
 using System.Net.NetworkInformation;
 using System.Reflection;
 
-[assembly: AssemblyTitle("ConnectionStat")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("ConnectionStat")]
-[assembly: AssemblyCopyright("Copyright ©  2022")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+//[assembly: AssemblyTitle("ConnectionStat")]
+//[assembly: AssemblyDescription("")]
+//[assembly: AssemblyConfiguration("")]
+//[assembly: AssemblyCompany("")]
+//[assembly: AssemblyProduct("ConnectionStat")]
+//[assembly: AssemblyCopyright("Copyright ©  2022")]
+//[assembly: AssemblyTrademark("")]
+//[assembly: AssemblyCulture("")]
+//[assembly: AssemblyVersion("1.0.0.0")]
+//[assembly: AssemblyFileVersion("1.0.0.0")]
 
 namespace ConnectionStat
 {
@@ -62,7 +62,7 @@ namespace ConnectionStat
                     }
                 }
 
-                if (dicTotal.Count > 1) PrintConnectionStat(dicTotal, "<SUM OF LISTED PORTS>");
+                if (args.Length > 1) PrintConnectionStat(dicTotal, "<SUM OF LISTED PORTS>");
             }
         }
 

+ 8 - 0
ConnectionStat/Properties/launchSettings.json

@@ -0,0 +1,8 @@
+{
+  "profiles": {
+    "ConnectionStat-net7": {
+      "commandName": "Project",
+      "commandLineArgs": "80 443"
+    }
+  }
+}

+ 3 - 0
ConnectionStat/app.config

@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>

+ 8 - 2
StrangeTools.sln

@@ -1,7 +1,7 @@
 
 Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.29920.165
+# Visual Studio Version 17
+VisualStudioVersion = 17.4.32804.182
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StrangeFileCopy", "StrangeFileCopy\StrangeFileCopy.csproj", "{7E8C017E-78B6-4AC1-B042-1BDFAF461EE7}"
 EndProject
@@ -40,6 +40,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConnectionStat", "Connectio
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleIcon", "ConsoleIcon\ConsoleIcon.csproj", "{6A1E8847-2290-462F-95D8-F2517C377130}"
 EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConnectionStat-net7", "ConnectionStat\ConnectionStat-net7.csproj", "{F5E85481-3D66-4613-8A38-9FB863248D18}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -110,6 +112,10 @@ Global
 		{6A1E8847-2290-462F-95D8-F2517C377130}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{6A1E8847-2290-462F-95D8-F2517C377130}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{6A1E8847-2290-462F-95D8-F2517C377130}.Release|Any CPU.Build.0 = Release|Any CPU
+		{F5E85481-3D66-4613-8A38-9FB863248D18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{F5E85481-3D66-4613-8A38-9FB863248D18}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{F5E85481-3D66-4613-8A38-9FB863248D18}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{F5E85481-3D66-4613-8A38-9FB863248D18}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE