diff --git a/src/Umbraco.Core/ApplicationContext.cs b/src/Umbraco.Core/ApplicationContext.cs
index a096858f90..d96880a2e2 100644
--- a/src/Umbraco.Core/ApplicationContext.cs
+++ b/src/Umbraco.Core/ApplicationContext.cs
@@ -90,7 +90,7 @@ namespace Umbraco.Core
try
{
string configStatus = ConfigurationStatus;
- string currentVersion = GlobalSettings.Version.ToString(3);
+ string currentVersion = UmbracoVersion.Current.ToString(3);
if (currentVersion != configStatus)
diff --git a/src/Umbraco.Core/Configuration/GlobalSettings.cs b/src/Umbraco.Core/Configuration/GlobalSettings.cs
index 5903598d09..5b9f24551d 100644
--- a/src/Umbraco.Core/Configuration/GlobalSettings.cs
+++ b/src/Umbraco.Core/Configuration/GlobalSettings.cs
@@ -254,7 +254,7 @@ namespace Umbraco.Core.Configuration
try
{
string configStatus = ConfigurationStatus;
- string currentVersion = Version.ToString(3);
+ string currentVersion = UmbracoVersion.Current.ToString(3);
if (currentVersion != configStatus)
@@ -406,28 +406,16 @@ namespace Umbraco.Core.Configuration
}
}
- ///
- /// Gets the current version of Umbraco.
- /// Version class with the specified major, minor, build (Patch), and revision numbers.
- ///
- ///
- /// CURRENT UMBRACO VERSION ID.
- ///
- public static Version Version
- {
- get { return _version ?? (_version = typeof (GlobalSettings).Assembly.GetName().Version); }
- }
-
///
/// Gets the current version.
///
/// The current version.
- [Obsolete("Use Umbraco.Core.Configuration.GlobalSettings.Version instead", false)]
+ [Obsolete("Use Umbraco.Core.Configuration.UmbracoVersion.Current instead", false)]
public static string CurrentVersion
{
get
{
- return Version.ToString(3);
+ return UmbracoVersion.Current.ToString(3);
}
}
@@ -435,12 +423,12 @@ namespace Umbraco.Core.Configuration
/// Gets the major version number.
///
/// The major version number.
- [Obsolete("Use Umbraco.Core.Configuration.GlobalSettings.Version instead", false)]
+ [Obsolete("Use Umbraco.Core.Configuration.UmbracoVersion.Current instead", false)]
public static int VersionMajor
{
get
{
- return Version.Major;
+ return UmbracoVersion.Current.Major;
}
}
@@ -448,12 +436,12 @@ namespace Umbraco.Core.Configuration
/// Gets the minor version number.
///
/// The minor version number.
- [Obsolete("Use Umbraco.Core.Configuration.GlobalSettings.Version instead", false)]
+ [Obsolete("Use Umbraco.Core.Configuration.UmbracoVersion.Current instead", false)]
public static int VersionMinor
{
get
{
- return Version.Minor;
+ return UmbracoVersion.Current.Minor;
}
}
@@ -461,12 +449,12 @@ namespace Umbraco.Core.Configuration
/// Gets the patch version number.
///
/// The patch version number.
- [Obsolete("Use Umbraco.Core.Configuration.GlobalSettings.Version instead", false)]
+ [Obsolete("Use Umbraco.Core.Configuration.UmbracoVersion.Current instead", false)]
public static int VersionPatch
{
get
{
- return Version.Build;
+ return UmbracoVersion.Current.Build;
}
}
@@ -474,12 +462,12 @@ namespace Umbraco.Core.Configuration
/// Gets the version comment (like beta or RC).
///
/// The version comment.
- [Obsolete("Use Umbraco.Core.Configuration.GlobalSettings.Version instead", false)]
+ [Obsolete("Use Umbraco.Core.Configuration.UmbracoVersion.Current instead", false)]
public static string VersionComment
{
get
{
- return "";
+ return Umbraco.Core.Configuration.UmbracoVersion.CurrentComment;
}
}
diff --git a/src/Umbraco.Core/Configuration/UmbracoVersion.cs b/src/Umbraco.Core/Configuration/UmbracoVersion.cs
new file mode 100644
index 0000000000..58c4364da3
--- /dev/null
+++ b/src/Umbraco.Core/Configuration/UmbracoVersion.cs
@@ -0,0 +1,27 @@
+using System;
+
+namespace Umbraco.Core.Configuration
+{
+ public class UmbracoVersion
+ {
+ private static Version _version;
+
+ ///
+ /// Gets the current version of Umbraco.
+ /// Version class with the specified major, minor, build (Patch), and revision numbers.
+ ///
+ ///
+ /// CURRENT UMBRACO VERSION ID.
+ ///
+ public static Version Current
+ {
+ get { return _version ?? (_version = typeof(UmbracoVersion).Assembly.GetName().Version); }
+ }
+
+ ///
+ /// Gets the version comment (like beta or RC).
+ ///
+ /// The version comment.
+ public static string CurrentComment { get { return ""; } }
+ }
+}
\ No newline at end of file
diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj
index c9f85c43b6..b86fcd642b 100644
--- a/src/Umbraco.Core/Umbraco.Core.csproj
+++ b/src/Umbraco.Core/Umbraco.Core.csproj
@@ -73,6 +73,7 @@
+
diff --git a/src/Umbraco.Tests/GlobalSettingsTests.cs b/src/Umbraco.Tests/GlobalSettingsTests.cs
index ea3a569428..f411a55a93 100644
--- a/src/Umbraco.Tests/GlobalSettingsTests.cs
+++ b/src/Umbraco.Tests/GlobalSettingsTests.cs
@@ -1,6 +1,7 @@
using System.Configuration;
using System.Web.Routing;
using NUnit.Framework;
+using Umbraco.Core.Configuration;
using Umbraco.Tests.TestHelpers;
using System.Web.Mvc;
@@ -32,7 +33,7 @@ namespace Umbraco.Tests
[Test]
public void Is_Version_From_Assembly_Correct()
{
- Assert.That(Umbraco.Core.Configuration.GlobalSettings.Version.ToString(3), Is.EqualTo("6.0.0"));
+ Assert.That(UmbracoVersion.Current.ToString(3), Is.EqualTo("6.0.0"));
}
[TestCase("/umbraco/umbraco.aspx")]
diff --git a/src/Umbraco.Tests/Routing/UmbracoModuleTests.cs b/src/Umbraco.Tests/Routing/UmbracoModuleTests.cs
index 78a484e8fd..aa6ec83ec6 100644
--- a/src/Umbraco.Tests/Routing/UmbracoModuleTests.cs
+++ b/src/Umbraco.Tests/Routing/UmbracoModuleTests.cs
@@ -5,6 +5,7 @@ using System.Threading;
using System.Xml;
using NUnit.Framework;
using Umbraco.Core;
+using Umbraco.Core.Configuration;
using Umbraco.Tests.TestHelpers;
using Umbraco.Web;
using Umbraco.Web.Routing;
@@ -57,7 +58,7 @@ namespace Umbraco.Tests.Routing
//create the module
_module = new UmbracoModule();
- ConfigurationManager.AppSettings.Set("umbracoConfigurationStatus", Umbraco.Core.Configuration.GlobalSettings.Version.ToString(3));
+ ConfigurationManager.AppSettings.Set("umbracoConfigurationStatus", UmbracoVersion.Current.ToString(3));
ConfigurationManager.AppSettings.Set("umbracoReservedPaths", "~/umbraco,~/install/");
ConfigurationManager.AppSettings.Set("umbracoReservedUrls", "~/config/splashes/booting.aspx,~/install/default.aspx,~/config/splashes/noNodes.aspx,~/VSEnterpriseHelper.axd");
diff --git a/src/Umbraco.Web.UI/config/splashes/noNodes.aspx b/src/Umbraco.Web.UI/config/splashes/noNodes.aspx
index b41724e1c5..640bb0229f 100644
--- a/src/Umbraco.Web.UI/config/splashes/noNodes.aspx
+++ b/src/Umbraco.Web.UI/config/splashes/noNodes.aspx
@@ -1,4 +1,5 @@
<%@ Page Language="C#" AutoEventWireup="true" Inherits="System.Web.UI.Page" %>
+<%@ Import Namespace="Umbraco.Core.Configuration" %>
@@ -7,7 +8,7 @@
Umbraco
- <%=Umbraco.Core.Configuration.GlobalSettings.Version.ToString(3)%>
+ <%=UmbracoVersion.Current.ToString(3)%>
- no pages found
diff --git a/src/Umbraco.Web.UI/install/Title.ascx b/src/Umbraco.Web.UI/install/Title.ascx
index 94eef72f48..4765f32e63 100644
--- a/src/Umbraco.Web.UI/install/Title.ascx
+++ b/src/Umbraco.Web.UI/install/Title.ascx
@@ -1,2 +1,3 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Title.ascx.cs" Inherits="umbraco.presentation.install.Title" %>
-Umbraco <%=Umbraco.Core.Configuration.GlobalSettings.Version.ToString(3)%> Configuration Wizard
\ No newline at end of file
+<%@ Import Namespace="Umbraco.Core.Configuration" %>
+Umbraco <%=UmbracoVersion.Current.ToString(3)%> Configuration Wizard
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI/install/steps/database.ascx b/src/Umbraco.Web.UI/install/steps/database.ascx
index 3f743d8052..77e33f5441 100644
--- a/src/Umbraco.Web.UI/install/steps/database.ascx
+++ b/src/Umbraco.Web.UI/install/steps/database.ascx
@@ -1,5 +1,6 @@
<%@ Control Language="c#" AutoEventWireup="True" CodeBehind="database.ascx.cs" Inherits="umbraco.presentation.install.steps.detect"
TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
+<%@ Import Namespace="Umbraco.Core.Configuration" %>
@@ -209,7 +210,7 @@