diff --git a/Jenkinsfile b/Jenkinsfile
index d1b7f3f3..7930cd77 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -122,7 +122,9 @@ pipeline {
env.GIT_COMMIT = bat(script: '@git rev-parse HEAD', returnStdout: true).trim()
}
powershell "powershell.exe -File .\\Scripts\\Versioning.ps1 -VersionFile './Scripts/PQBrowser.version' -Commit false"
+ powershell "powershell.exe -File .\\Scripts\\PackageVersioning.ps1 -VersionFile './PQBrowser/package.json'"
bat(script: "@git add Scripts/PQBrowser.version")
+ bat(script: "@git add PQBrowser/package.json")
bat(script: "git diff --cached --quiet || git commit -m \"Updated Version Number\"")
}
}
diff --git a/PQBrowser/PQBrowser.csproj b/PQBrowser/PQBrowser.csproj
index f31d6686..dc9e5ec6 100644
--- a/PQBrowser/PQBrowser.csproj
+++ b/PQBrowser/PQBrowser.csproj
@@ -84,11 +84,7 @@
PreserveNewest
-
- PreserveNewest
- PreserveNewest
-
-
+
diff --git a/PQBrowser/Startup.cs b/PQBrowser/Startup.cs
index 2e77036c..7637743e 100644
--- a/PQBrowser/Startup.cs
+++ b/PQBrowser/Startup.cs
@@ -42,7 +42,6 @@
using PQBrowser.Security;
using System;
using System.IO;
-using System.Text.Json;
namespace PQBrowser;
public class Startup
@@ -52,9 +51,6 @@ public Startup(IConfiguration configuration, IWebHostEnvironment env)
SetupTempPath();
Configuration = configuration;
Env = env;
-
- using JsonDocument package = JsonDocument.Parse(File.ReadAllText(Path.Combine(env.ContentRootPath, "package.json")));
- UIVersion = package.RootElement.GetProperty("version").GetString()!;
}
public static class Policies
@@ -65,7 +61,6 @@ public static class Policies
public IWebHostEnvironment Env { get; set; }
public IConfiguration Configuration { get; }
- public static string UIVersion { get; private set; } = "";
public void ConfigureServices(IServiceCollection services)
{
diff --git a/PQBrowser/Views/Home/Index.cshtml b/PQBrowser/Views/Home/Index.cshtml
index 1614ff15..72ece45f 100644
--- a/PQBrowser/Views/Home/Index.cshtml
+++ b/PQBrowser/Views/Home/Index.cshtml
@@ -22,6 +22,7 @@
//*******************************************************************************************************@
@using Gemstone.Data
@using Gemstone.Configuration;
+@using Gemstone.Reflection
@using Microsoft.AspNetCore.Antiforgery
@using Microsoft.AspNetCore.Authentication.Cookies
@using Microsoft.Extensions.Options
@@ -40,6 +41,9 @@
@{
Layout = "";
+ Version assemblyVersionInfo = AssemblyInfo.EntryAssembly.Version;
+ string applicationVersion = assemblyVersionInfo.Major + "." + assemblyVersionInfo.Minor + "." + assemblyVersionInfo.Build;
+
try {
using (AdoDataConnection connection = new AdoDataConnection(Settings.Default))
{
@@ -123,6 +127,6 @@
-
+