From 16cf40972009ada4530b09a30bc61c194c8abe8f Mon Sep 17 00:00:00 2001 From: wanggang <76527413@qq.com> Date: Fri, 14 Feb 2020 15:05:35 +0800 Subject: [PATCH] update Former-commit-id: 9d5a0221e8a6c4db6a9370a0b7851512c4777dfc --- projects/ApiGateway/ApiGateway.csproj | 2 +- .../Areas/Admin/Views/Shared/_Layout.cshtml | 2 +- .../Extensions/HelperExtensions.cs | 9 ++++-- .../Views/Account/_Layout.cshtml | 2 +- .../Views/Shared/_Layout.cshtml | 2 +- projects/IoTCenter/IoTCenter.csproj | 4 +-- projects/IoTCenter/appsettings.json | 1 - projects/IoTKeyGen/IoTKeyGen.csproj | 1 - .../ManagementCenter/ManagementCenter.csproj | 2 +- projects/WebApp/WebApp.csproj | 1 - projects/WebUI/WebUI.csproj | 2 +- projects/projects.sln | 32 ++----------------- 12 files changed, 15 insertions(+), 45 deletions(-) diff --git a/projects/ApiGateway/ApiGateway.csproj b/projects/ApiGateway/ApiGateway.csproj index 25213081..cd9f6016 100644 --- a/projects/ApiGateway/ApiGateway.csproj +++ b/projects/ApiGateway/ApiGateway.csproj @@ -12,4 +12,4 @@ PreserveNewest - + \ No newline at end of file diff --git a/projects/Infrastructure/Areas/Admin/Views/Shared/_Layout.cshtml b/projects/Infrastructure/Areas/Admin/Views/Shared/_Layout.cshtml index 39aa10d9..514a4bbb 100644 --- a/projects/Infrastructure/Areas/Admin/Views/Shared/_Layout.cshtml +++ b/projects/Infrastructure/Areas/Admin/Views/Shared/_Layout.cshtml @@ -90,7 +90,7 @@ @Html.Raw(cfg["copyright"].Replace("{now}", DateTime.Now.Year.ToString()))
- Version @Html.Raw(cfg["version"]) + v @Helper.Instance.GetVersion()
diff --git a/projects/Infrastructure/Extensions/HelperExtensions.cs b/projects/Infrastructure/Extensions/HelperExtensions.cs index a2558aaa..61b9e212 100644 --- a/projects/Infrastructure/Extensions/HelperExtensions.cs +++ b/projects/Infrastructure/Extensions/HelperExtensions.cs @@ -1,4 +1,3 @@ -using System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -6,15 +5,19 @@ using System.Management; using System.Net; using System.Net.NetworkInformation; using System.Net.Sockets; +using System.Reflection; using System.Runtime.InteropServices; -using System.Security.Cryptography; -using System.Text; using System.Text.RegularExpressions; namespace Infrastructure.Extensions { public static class HelperExtensions { + public static string GetVersion(this Helper helper) + { + return Assembly.GetEntryAssembly().GetCustomAttribute().InformationalVersion; + } + public static string GetCPUNumber(this Helper helper) { if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) diff --git a/projects/Infrastructure/Views/Account/_Layout.cshtml b/projects/Infrastructure/Views/Account/_Layout.cshtml index 564d1c28..3d4ffcd4 100644 --- a/projects/Infrastructure/Views/Account/_Layout.cshtml +++ b/projects/Infrastructure/Views/Account/_Layout.cshtml @@ -90,7 +90,7 @@ @Html.Raw(cfg["copyright"].Replace("{now}", DateTime.Now.Year.ToString()))
- Version @Html.Raw(cfg["version"]) + v @Helper.Instance.GetVersion() @if (User.Identity.IsAuthenticated) { 管理 diff --git a/projects/Infrastructure/Views/Shared/_Layout.cshtml b/projects/Infrastructure/Views/Shared/_Layout.cshtml index ab75af6f..a7e80abe 100644 --- a/projects/Infrastructure/Views/Shared/_Layout.cshtml +++ b/projects/Infrastructure/Views/Shared/_Layout.cshtml @@ -87,7 +87,7 @@ @Html.Raw(cfg["copyright"].Replace("{now}", DateTime.Now.Year.ToString()))
- Version @Html.Raw(cfg["version"]) + v @Helper.Instance.GetVersion() @if (User.Identity.IsAuthenticated) { 管理 diff --git a/projects/IoTCenter/IoTCenter.csproj b/projects/IoTCenter/IoTCenter.csproj index b1e1200d..68f5989b 100644 --- a/projects/IoTCenter/IoTCenter.csproj +++ b/projects/IoTCenter/IoTCenter.csproj @@ -2,12 +2,10 @@ netcoreapp3.1 true + 1.0.0-alpha.214 - - - \ No newline at end of file diff --git a/projects/IoTCenter/appsettings.json b/projects/IoTCenter/appsettings.json index 1a8f7f5b..0273198b 100644 --- a/projects/IoTCenter/appsettings.json +++ b/projects/IoTCenter/appsettings.json @@ -1,5 +1,4 @@ { - "version": "1.0.0-alpha.214", "Logging": { "LogLevel": { "Default": "Warning", diff --git a/projects/IoTKeyGen/IoTKeyGen.csproj b/projects/IoTKeyGen/IoTKeyGen.csproj index 523be7ac..8104da19 100644 --- a/projects/IoTKeyGen/IoTKeyGen.csproj +++ b/projects/IoTKeyGen/IoTKeyGen.csproj @@ -1,5 +1,4 @@  - WinExe netcoreapp3.1 diff --git a/projects/ManagementCenter/ManagementCenter.csproj b/projects/ManagementCenter/ManagementCenter.csproj index 4ddeb1ae..88b944dc 100644 --- a/projects/ManagementCenter/ManagementCenter.csproj +++ b/projects/ManagementCenter/ManagementCenter.csproj @@ -6,4 +6,4 @@ - + \ No newline at end of file diff --git a/projects/WebApp/WebApp.csproj b/projects/WebApp/WebApp.csproj index ddeb6156..46636dde 100644 --- a/projects/WebApp/WebApp.csproj +++ b/projects/WebApp/WebApp.csproj @@ -1,5 +1,4 @@  - netcoreapp3.1 diff --git a/projects/WebUI/WebUI.csproj b/projects/WebUI/WebUI.csproj index ede2e499..d2a17b68 100644 --- a/projects/WebUI/WebUI.csproj +++ b/projects/WebUI/WebUI.csproj @@ -3,4 +3,4 @@ netcoreapp3.1 true - + \ No newline at end of file diff --git a/projects/projects.sln b/projects/projects.sln index e763ea4a..9acf2ff8 100644 --- a/projects/projects.sln +++ b/projects/projects.sln @@ -15,8 +15,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IoTNode", "IoTNode\IoTNode. EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IoT.Shared", "IoT.Shared\IoT.Shared.csproj", "{BE6DEBC5-004F-4811-8BDC-67C74D9E8C2F}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IoTKeyGen", "IoTKeyGen\IoTKeyGen.csproj", "{F01F3FEA-A8A8-4239-865F-E69773CEB2F3}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{48C7AE84-0BDC-4F8A-89ED-C6B82EC46C9F}" ProjectSection(SolutionItems) = preProject NuGet.config = NuGet.config @@ -34,11 +32,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "IoT", "IoT", "{AE34E06D-C5C EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebUI", "WebUI\WebUI.csproj", "{B662B063-A311-4678-ADA4-83AD1A2F9C47}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ApiGateway", "ApiGateway\ApiGateway.csproj", "{85B06C97-E253-4ECE-8FAB-8823414BA4C9}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ManagementCenter", "ManagementCenter\ManagementCenter.csproj", "{5F0FAEDB-C0F6-44F1-AA06-424AB759AF15}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebApp", "WebApp\WebApp.csproj", "{6BCC9220-0B03-4BDB-BE70-814F6B16ECCE}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebApp", "WebApp\WebApp.csproj", "{6BCC9220-0B03-4BDB-BE70-814F6B16ECCE}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -122,18 +118,6 @@ Global {BE6DEBC5-004F-4811-8BDC-67C74D9E8C2F}.Release|iPhone.Build.0 = Release|Any CPU {BE6DEBC5-004F-4811-8BDC-67C74D9E8C2F}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU {BE6DEBC5-004F-4811-8BDC-67C74D9E8C2F}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {F01F3FEA-A8A8-4239-865F-E69773CEB2F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F01F3FEA-A8A8-4239-865F-E69773CEB2F3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F01F3FEA-A8A8-4239-865F-E69773CEB2F3}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {F01F3FEA-A8A8-4239-865F-E69773CEB2F3}.Debug|iPhone.Build.0 = Debug|Any CPU - {F01F3FEA-A8A8-4239-865F-E69773CEB2F3}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {F01F3FEA-A8A8-4239-865F-E69773CEB2F3}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {F01F3FEA-A8A8-4239-865F-E69773CEB2F3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F01F3FEA-A8A8-4239-865F-E69773CEB2F3}.Release|Any CPU.Build.0 = Release|Any CPU - {F01F3FEA-A8A8-4239-865F-E69773CEB2F3}.Release|iPhone.ActiveCfg = Release|Any CPU - {F01F3FEA-A8A8-4239-865F-E69773CEB2F3}.Release|iPhone.Build.0 = Release|Any CPU - {F01F3FEA-A8A8-4239-865F-E69773CEB2F3}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {F01F3FEA-A8A8-4239-865F-E69773CEB2F3}.Release|iPhoneSimulator.Build.0 = Release|Any CPU {B662B063-A311-4678-ADA4-83AD1A2F9C47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B662B063-A311-4678-ADA4-83AD1A2F9C47}.Debug|Any CPU.Build.0 = Debug|Any CPU {B662B063-A311-4678-ADA4-83AD1A2F9C47}.Debug|iPhone.ActiveCfg = Debug|Any CPU @@ -146,18 +130,6 @@ Global {B662B063-A311-4678-ADA4-83AD1A2F9C47}.Release|iPhone.Build.0 = Release|Any CPU {B662B063-A311-4678-ADA4-83AD1A2F9C47}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU {B662B063-A311-4678-ADA4-83AD1A2F9C47}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {85B06C97-E253-4ECE-8FAB-8823414BA4C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {85B06C97-E253-4ECE-8FAB-8823414BA4C9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {85B06C97-E253-4ECE-8FAB-8823414BA4C9}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {85B06C97-E253-4ECE-8FAB-8823414BA4C9}.Debug|iPhone.Build.0 = Debug|Any CPU - {85B06C97-E253-4ECE-8FAB-8823414BA4C9}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {85B06C97-E253-4ECE-8FAB-8823414BA4C9}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {85B06C97-E253-4ECE-8FAB-8823414BA4C9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {85B06C97-E253-4ECE-8FAB-8823414BA4C9}.Release|Any CPU.Build.0 = Release|Any CPU - {85B06C97-E253-4ECE-8FAB-8823414BA4C9}.Release|iPhone.ActiveCfg = Release|Any CPU - {85B06C97-E253-4ECE-8FAB-8823414BA4C9}.Release|iPhone.Build.0 = Release|Any CPU - {85B06C97-E253-4ECE-8FAB-8823414BA4C9}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {85B06C97-E253-4ECE-8FAB-8823414BA4C9}.Release|iPhoneSimulator.Build.0 = Release|Any CPU {5F0FAEDB-C0F6-44F1-AA06-424AB759AF15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5F0FAEDB-C0F6-44F1-AA06-424AB759AF15}.Debug|Any CPU.Build.0 = Debug|Any CPU {5F0FAEDB-C0F6-44F1-AA06-424AB759AF15}.Debug|iPhone.ActiveCfg = Debug|Any CPU @@ -190,9 +162,9 @@ Global {264A3E6B-80A1-488D-841D-930B810B85D2} = {6044D20E-13BA-47BF-BD42-CCC5267ACCEF} {F48CA65D-B2D6-4DB8-A396-A3FE913804FB} = {AE34E06D-C5C7-44BC-B168-85808318516C} {BE6DEBC5-004F-4811-8BDC-67C74D9E8C2F} = {AE34E06D-C5C7-44BC-B168-85808318516C} - {F01F3FEA-A8A8-4239-865F-E69773CEB2F3} = {AE34E06D-C5C7-44BC-B168-85808318516C} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {0B7095FB-5E70-4EF8-805A-CB4A91AE4B0A} + BuildVersion_StartDate = 2000/1/1 EndGlobalSection EndGlobal