diff --git a/build/NuSpecs/UmbracoCms.Compat7.nuspec b/build/NuSpecs/UmbracoCms.Compat7.nuspec
deleted file mode 100644
index d2719a694e..0000000000
--- a/build/NuSpecs/UmbracoCms.Compat7.nuspec
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- UmbracoCms.Compat7
- 8.0.0
- Umbraco Cms Compat7
- Umbraco HQ
- Umbraco HQ
- http://opensource.org/licenses/MIT
- http://umbraco.com/
- http://umbraco.com/media/357769/100px_transparent.png
- false
- Contains resources aiming at providing a better v7-to-v8 backward compatibility.
- Umbraco v7 compatibility layer for v8.
- en-US
- umbraco
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/build/NuSpecs/UmbracoCms.Core.nuspec b/build/NuSpecs/UmbracoCms.Core.nuspec
index 64c8b89f49..ad690227b1 100644
--- a/build/NuSpecs/UmbracoCms.Core.nuspec
+++ b/build/NuSpecs/UmbracoCms.Core.nuspec
@@ -21,7 +21,7 @@
-
+
@@ -33,7 +33,7 @@
-
+
@@ -41,6 +41,8 @@
+
+
diff --git a/build/NuSpecs/UmbracoCms.nuspec b/build/NuSpecs/UmbracoCms.nuspec
index 8f5cf495c7..241a46d2c2 100644
--- a/build/NuSpecs/UmbracoCms.nuspec
+++ b/build/NuSpecs/UmbracoCms.nuspec
@@ -16,8 +16,7 @@
umbraco
-
-
+
diff --git a/build/build.ps1 b/build/build.ps1
index c23b492be7..0db043cafe 100644
--- a/build/build.ps1
+++ b/build/build.ps1
@@ -153,7 +153,6 @@
$src = "$($this.SolutionRoot)\src"
$log = "$($this.BuildTemp)\msbuild.umbraco.log"
- $log7 = "$($this.BuildTemp)\msbuild.compat7.log"
if ($this.BuildEnv.VisualStudio -eq $null)
{
@@ -181,24 +180,6 @@
if (-not $?) { throw "Failed to compile Umbraco.Web.UI." }
- Write-Host "Logging to $log7"
-
- &$this.BuildEnv.VisualStudio.MsBuild "$src\Umbraco.Compat7\Umbraco.Compat7.csproj" `
- /p:WarningLevel=0 `
- /p:Configuration=$buildConfiguration `
- /p:Platform=AnyCPU `
- /p:UseWPP_CopyWebApplication=True `
- /p:PipelineDependsOnBuild=False `
- /p:OutDir="$($this.BuildTemp)\bin\\" `
- /p:WebProjectOutputDir="$($this.BuildTemp)\WebApp\\" `
- /p:Verbosity=minimal `
- /t:Rebuild `
- /tv:"$($this.BuildEnv.VisualStudio.ToolsVersion)" `
- /p:UmbracoBuild=True `
- > $log7
-
- if (-not $?) { throw "Failed to compile Umbraco.Compat7." }
-
# /p:UmbracoBuild tells the csproj that we are building from PS, not VS
})
@@ -342,14 +323,14 @@
Write-Host "Zip all binaries"
&$this.BuildEnv.Zip a -r "$out\UmbracoCms.AllBinaries.$($this.Version.Semver).zip" `
"$tmp\bin\*" `
- "-x!dotless.Core.*" "-x!Umbraco.Compat7.*" `
+ "-x!dotless.Core.*" `
> $null
if (-not $?) { throw "Failed to zip UmbracoCms.AllBinaries." }
Write-Host "Zip cms"
&$this.BuildEnv.Zip a -r "$out\UmbracoCms.$($this.Version.Semver).zip" `
"$tmp\WebApp\*" `
- "-x!dotless.Core.*" "-x!Content_Types.xml" "-x!*.pdb" "-x!Umbraco.Compat7.*" `
+ "-x!dotless.Core.*" "-x!Content_Types.xml" "-x!*.pdb" `
> $null
if (-not $?) { throw "Failed to zip UmbracoCms." }
})
@@ -427,12 +408,6 @@
-Verbosity detailed -outputDirectory "$($this.BuildOutput)" > "$($this.BuildTemp)\nupack.cms.log"
if (-not $?) { throw "Failed to pack NuGet UmbracoCms." }
- &$this.BuildEnv.NuGet Pack "$nuspecs\UmbracoCms.Compat7.nuspec" `
- -Properties BuildTmp="$($this.BuildTemp)" `
- -Version $this.Version.Semver.ToString() `
- -Verbosity detailed -outputDirectory "$($this.BuildOutput)" > "$($this.BuildTemp)\nupack.compat7.log"
- if (-not $?) { throw "Failed to pack NuGet UmbracoCms.Compat7." }
-
# run hook
if ($this.HasMethod("PostPackageNuGet"))
{
@@ -445,8 +420,8 @@
$ubuild.DefineMethod("VerifyNuGet",
{
$this.VerifyNuGetConsistency(
- ("UmbracoCms", "UmbracoCms.Core", "UmbracoCms.Compat7"),
- ("Umbraco.Core", "Umbraco.Web", "Umbraco.Web.UI", "Umbraco.Examine", "Umbraco.Compat7"))
+ ("UmbracoCms", "UmbracoCms.Core"),
+ ("Umbraco.Core", "Umbraco.Web", "Umbraco.Web.UI", "Umbraco.Examine"))
if ($this.OnError()) { return }
})
diff --git a/src/Umbraco.Compat7/Compat7Component.cs b/src/Umbraco.Compat7/Compat7Component.cs
deleted file mode 100644
index 6fe60ad31b..0000000000
--- a/src/Umbraco.Compat7/Compat7Component.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-using System;
-using System.Collections.Generic;
-using LightInject;
-using System.Linq;
-using Umbraco.Core;
-using Umbraco.Core.Components;
-using Umbraco.Core.Logging;
-using Umbraco.Core.Composing;
-
-namespace Umbraco.Compat7
-{
- public class Compat7Component : UmbracoComponentBase, IUmbracoUserComponent
- {
- private List _handlers;
- private UmbracoApplicationBase _app;
-
- // these events replace the UmbracoApplicationBase corresponding events
- public static event EventHandler ApplicationStarting;
- public static event EventHandler ApplicationStarted;
-
- public override void Compose(Composition composition)
- {
- base.Compose(composition);
-
- var container = composition.Container;
- _app = container.GetInstance();
- var logger = container.GetInstance();
-
- var pluginManager = container.GetInstance();
- var handlerTypes = pluginManager.GetTypes();
-
- _handlers = handlerTypes.Select(Activator.CreateInstance).Cast().ToList();
-
- foreach (var handler in _handlers)
- logger.Debug($"Adding ApplicationEventHandler {handler.GetType().FullName}.");
-
- foreach (var handler in _handlers)
- handler.OnApplicationInitialized(_app, ApplicationContext.Current);
-
- foreach (var handler in _handlers)
- handler.OnApplicationStarting(_app, ApplicationContext.Current);
-
- try
- {
- ApplicationStarting?.Invoke(_app, EventArgs.Empty);
- }
- catch (Exception ex)
- {
- logger.Error("An error occurred in an ApplicationStarting event handler", ex);
- throw;
- }
- }
-
- public void Initialize(ILogger logger)
- {
- foreach (var handler in _handlers)
- handler.OnApplicationStarted(_app, ApplicationContext.Current);
-
- try
- {
- ApplicationStarted?.Invoke(_app, EventArgs.Empty);
- }
- catch (Exception ex)
- {
- logger.Error("An error occurred in an ApplicationStarting event handler", ex);
- throw;
- }
- }
- }
-}
diff --git a/src/Umbraco.Compat7/Core/ActionsResolver.cs b/src/Umbraco.Compat7/Core/ActionsResolver.cs
deleted file mode 100644
index 3ee2a26ee0..0000000000
--- a/src/Umbraco.Compat7/Core/ActionsResolver.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System.Collections.Generic;
-using Umbraco.Web._Legacy.Actions;
-using WebCurrent = Umbraco.Web.Composing.Current;
-
-// ReSharper disable once CheckNamespace
-namespace Umbraco.Core
-{
- public class ActionsResolver
- {
- private ActionsResolver()
- { }
-
- public static ActionsResolver Current { get; } = new ActionsResolver();
-
- public IEnumerable Actions => WebCurrent.Actions;
- }
-}
diff --git a/src/Umbraco.Compat7/Core/ApplicationContext.cs b/src/Umbraco.Compat7/Core/ApplicationContext.cs
deleted file mode 100644
index 136ab42138..0000000000
--- a/src/Umbraco.Compat7/Core/ApplicationContext.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-using System;
-using Umbraco.Core.Cache;
-using Umbraco.Core.Logging;
-using Umbraco.Core.Persistence;
-using Umbraco.Core.Services;
-using LightInject;
-
-// ReSharper disable once CheckNamespace
-namespace Umbraco.Core
-{
- public class ApplicationContext : IDisposable
- {
- private ApplicationContext()
- {
- DatabaseContext = new DatabaseContext(Composing.Current.Container.GetInstance());
- }
-
- public static ApplicationContext Current { get; } = new ApplicationContext();
-
- public CacheHelper ApplicationCache => Composing.Current.ApplicationCache;
-
- public ProfilingLogger ProfilingLogger => Composing.Current.ProfilingLogger;
-
- public bool IsReady { get; } = true; // because... not accessible before we are ready
-
- public bool IsConfigured => Composing.Current.RuntimeState.Level == RuntimeLevel.Run;
-
- public bool IsUpgrading => Composing.Current.RuntimeState.Level == RuntimeLevel.Upgrade;
-
- public DatabaseContext DatabaseContext { get; }
-
- public ServiceContext Services => Composing.Current.Services;
-
- public void Dispose()
- { }
- }
-}
diff --git a/src/Umbraco.Compat7/Core/ApplicationEventHandler.cs b/src/Umbraco.Compat7/Core/ApplicationEventHandler.cs
deleted file mode 100644
index b60c5dd49f..0000000000
--- a/src/Umbraco.Compat7/Core/ApplicationEventHandler.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-// ReSharper disable once CheckNamespace
-namespace Umbraco.Core
-{
- public abstract class ApplicationEventHandler : IApplicationEventHandler
- {
- public void OnApplicationInitialized(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
- {
- if (ShouldExecute(applicationContext))
- {
- ApplicationInitialized(umbracoApplication, applicationContext);
- }
- }
-
- public void OnApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
- {
- if (ShouldExecute(applicationContext))
- {
- ApplicationStarting(umbracoApplication, applicationContext);
- }
- }
-
- public void OnApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
- {
- if (ShouldExecute(applicationContext))
- {
- ApplicationStarted(umbracoApplication, applicationContext);
- }
- }
-
- protected virtual void ApplicationInitialized(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
- { }
-
- protected virtual void ApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
- { }
-
- protected virtual void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
- { }
-
- private bool ShouldExecute(ApplicationContext applicationContext)
- {
- if (applicationContext.IsConfigured && applicationContext.DatabaseContext.IsDatabaseConfigured)
- {
- return true;
- }
-
- if (applicationContext.IsConfigured == false && ExecuteWhenApplicationNotConfigured)
- {
- return true;
- }
-
- if (applicationContext.DatabaseContext.IsDatabaseConfigured == false && ExecuteWhenDatabaseNotConfigured)
- {
- return true;
- }
-
- return false;
- }
-
- protected virtual bool ExecuteWhenApplicationNotConfigured => false;
-
- protected virtual bool ExecuteWhenDatabaseNotConfigured => false;
- }
-}
diff --git a/src/Umbraco.Compat7/Core/Cache/CacheRefreshersResolver.cs b/src/Umbraco.Compat7/Core/Cache/CacheRefreshersResolver.cs
deleted file mode 100644
index 849e9ad483..0000000000
--- a/src/Umbraco.Compat7/Core/Cache/CacheRefreshersResolver.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Umbraco.Core.ObjectResolution;
-using CoreCurrent = Umbraco.Core.Composing.Current;
-using LightInject;
-
-// ReSharper disable once CheckNamespace
-namespace Umbraco.Core.Cache
-{
- public class CacheRefreshersResolver : LazyManyObjectsResolverBase
- {
- private CacheRefreshersResolver(CacheRefresherCollectionBuilder builder)
- : base(builder)
- { }
-
- public static CacheRefreshersResolver Current { get; }
- = new CacheRefreshersResolver(CoreCurrent.Container.GetInstance());
-
- public IEnumerable CacheRefreshers => CoreCurrent.CacheRefreshers;
-
- public ICacheRefresher GetById(Guid id) => CoreCurrent.CacheRefreshers[id];
- }
-}
diff --git a/src/Umbraco.Compat7/Core/DatabaseContext.cs b/src/Umbraco.Compat7/Core/DatabaseContext.cs
deleted file mode 100644
index 35a5829a56..0000000000
--- a/src/Umbraco.Compat7/Core/DatabaseContext.cs
+++ /dev/null
@@ -1,65 +0,0 @@
-using System;
-using NPoco;
-using Umbraco.Core.Persistence;
-using Umbraco.Core.Persistence.Querying;
-using Umbraco.Core.Persistence.SqlSyntax;
-
-// ReSharper disable once CheckNamespace
-namespace Umbraco.Core
-{
- public class DatabaseContext
- {
- private readonly IUmbracoDatabaseFactory _databaseFactory;
-
- ///
- /// Initializes a new instance of the class.
- ///
- /// A database factory.
- /// The database factory will try to configure itself but may fail eg if the default
- /// Umbraco connection string is not available because we are installing. In which case this
- /// database builder must sort things out and configure the database factory before it can be
- /// used.
- public DatabaseContext(IUmbracoDatabaseFactory databaseFactory)
- {
- _databaseFactory = databaseFactory ?? throw new ArgumentNullException(nameof(databaseFactory));
- }
-
- ///
- /// Gets the database Sql syntax.
- ///
- public ISqlSyntaxProvider SqlSyntax => _databaseFactory.SqlContext.SqlSyntax;
-
- ///
- /// Creates a Sql statement.
- ///
- public Sql Sql() => _databaseFactory.SqlContext.Sql();
-
- ///
- /// Creates a Sql statement.
- ///
- public Sql Sql(string sql, params object[] args) => _databaseFactory.SqlContext.Sql(sql, args);
-
- ///
- /// Creates a Query expression.
- ///
- public IQuery Query() => _databaseFactory.SqlContext.Query();
-
- ///
- /// Gets an ambient database for doing CRUD operations against custom tables that resides in the Umbraco database.
- ///
- /// Should not be used for operation against standard Umbraco tables; as services should be used instead.
- public IUmbracoDatabase Database => throw new NotImplementedException(); // there's no magic?
-
- ///
- /// Gets a value indicating whether the database is configured.
- ///
- /// It does not necessarily mean that it is possible to
- /// connect, nor that Umbraco is installed, nor up-to-date.
- public bool IsDatabaseConfigured => _databaseFactory.Configured;
-
- ///
- /// Gets a value indicating whether it is possible to connect to the database.
- ///
- public bool CanConnect => _databaseFactory.Configured && _databaseFactory.CanConnect;
- }
-}
diff --git a/src/Umbraco.Compat7/Core/Dictionary/CultureDictionaryFactoryResolver.cs b/src/Umbraco.Compat7/Core/Dictionary/CultureDictionaryFactoryResolver.cs
deleted file mode 100644
index 10bab2f875..0000000000
--- a/src/Umbraco.Compat7/Core/Dictionary/CultureDictionaryFactoryResolver.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using Umbraco.Core.Composing;
-using CoreCurrent = Umbraco.Core.Composing.Current;
-
-// ReSharper disable once CheckNamespace
-namespace Umbraco.Core.Dictionary
-{
- public class CultureDictionaryFactoryResolver
- {
- private CultureDictionaryFactoryResolver()
- { }
-
- public static bool HasCurrent => true;
-
- public static CultureDictionaryFactoryResolver Current { get; }
- = new CultureDictionaryFactoryResolver();
-
- public ICultureDictionaryFactory Factory => CoreCurrent.CultureDictionaryFactory;
-
- public void SetDictionaryFactory(ICultureDictionaryFactory factory)
- {
- CoreCurrent.Container.RegisterSingleton(_ => factory);
- }
- }
-}
diff --git a/src/Umbraco.Compat7/Core/IApplicationEventHandler.cs b/src/Umbraco.Compat7/Core/IApplicationEventHandler.cs
deleted file mode 100644
index 098e66e1aa..0000000000
--- a/src/Umbraco.Compat7/Core/IApplicationEventHandler.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-// ReSharper disable once CheckNamespace
-
-using Umbraco.Core.Composing;
-
-namespace Umbraco.Core
-{
- ///
- /// Custom IApplicationStartupHandler that auto subscribes to the applications events
- ///
- public interface IApplicationEventHandler : IDiscoverable
- {
- ///
- /// ApplicationContext is created and other static objects that require initialization have been setup
- ///
- ///
- ///
- void OnApplicationInitialized(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext);
-
- ///
- /// All resolvers have been initialized but resolution is not frozen so they can be modified in this method
- ///
- ///
- ///
- void OnApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext);
-
- ///
- /// Bootup is completed, this allows you to perform any other bootup logic required for the application.
- /// Resolution is frozen so now they can be used to resolve instances.
- ///
- ///
- ///
- void OnApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext);
- }
-}
diff --git a/src/Umbraco.Compat7/Core/Logging/LogHelper.cs b/src/Umbraco.Compat7/Core/Logging/LogHelper.cs
deleted file mode 100644
index 060c2b9c53..0000000000
--- a/src/Umbraco.Compat7/Core/Logging/LogHelper.cs
+++ /dev/null
@@ -1,222 +0,0 @@
-using System;
-using System.Linq;
-using System.Web;
-using Umbraco.Core.Composing;
-using Umbraco.Core.Exceptions;
-using Umbraco.Web;
-
-// ReSharper disable once CheckNamespace
-namespace Umbraco.Core.Logging
-{
- public static class LogHelper
- {
- #region Error
- ///
- /// Adds an error log
- ///
- ///
- ///
- ///
- public static void Error(string message, Exception exception)
- {
- Current.Logger.Error(typeof(T), message, exception);
- }
-
- public static void Error(Type callingType, string message, Exception exception)
- {
- Current.Logger.Error(callingType, message, exception);
- }
-
- #endregion
-
- #region Warn
-
- public static void Warn(Type callingType, string message, params Func