diff --git a/build/NuSpecs/UmbracoCms.Core.nuspec b/build/NuSpecs/UmbracoCms.Core.nuspec deleted file mode 100644 index 3f2aafb259..0000000000 --- a/build/NuSpecs/UmbracoCms.Core.nuspec +++ /dev/null @@ -1,96 +0,0 @@ - - - - Umbraco.Cms.Core - 9.0.0 - Umbraco Cms Core Binaries - Umbraco HQ - Umbraco HQ - MIT - https://umbraco.com/ - https://umbraco.com/dist/nuget/logo-small.png - false - Contains the core assemblies needed to run Umbraco Cms. This package only contains assemblies and can be used for package development. Use the UmbracoCms package to setup Umbraco in Visual Studio as an ASP.NET Core project. - Contains the core assemblies needed to run Umbraco Cms - en-US - umbraco - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/NuSpecs/UmbracoCms.Examine.Lucene.nuspec b/build/NuSpecs/UmbracoCms.Examine.Lucene.nuspec index 7e05f20e64..19d60f27a9 100644 --- a/build/NuSpecs/UmbracoCms.Examine.Lucene.nuspec +++ b/build/NuSpecs/UmbracoCms.Examine.Lucene.nuspec @@ -22,6 +22,7 @@ + diff --git a/build/NuSpecs/UmbracoCms.Web.nuspec b/build/NuSpecs/UmbracoCms.Web.nuspec deleted file mode 100644 index f12ada7e64..0000000000 --- a/build/NuSpecs/UmbracoCms.Web.nuspec +++ /dev/null @@ -1,57 +0,0 @@ - - - - Umbraco.Cms.Web - 9.0.0 - Umbraco Cms Core Binaries - Umbraco HQ - Umbraco HQ - MIT - https://umbraco.com/ - https://umbraco.com/dist/nuget/logo-small.png - false - Contains the web assemblies needed to run Umbraco Cms. This package only contains assemblies and can be used for package development. Use the UmbracoCms package to setup Umbraco in Visual Studio as an ASP.NET Core project. - Contains the core assemblies needed to run Umbraco Cms - en-US - umbraco - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Umbraco.Core/Configuration/ModelsBuilderConfigExtensions.cs b/src/Umbraco.Core/Configuration/ModelsBuilderConfigExtensions.cs index 3d620ee9e5..0f397a749f 100644 --- a/src/Umbraco.Core/Configuration/ModelsBuilderConfigExtensions.cs +++ b/src/Umbraco.Core/Configuration/ModelsBuilderConfigExtensions.cs @@ -1,6 +1,6 @@ -using System.Configuration; -using System.IO; +using System.IO; using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Exceptions; using Umbraco.Cms.Core.Hosting; namespace Umbraco.Extensions @@ -30,7 +30,7 @@ namespace Umbraco.Extensions // unless AcceptUnsafeModelsDirectory and then everything is OK. if (!Path.IsPathRooted(root)) - throw new ConfigurationErrorsException($"Root is not rooted \"{root}\"."); + throw new ConfigurationException($"Root is not rooted \"{root}\"."); if (config.StartsWith("~/")) { @@ -43,7 +43,7 @@ namespace Umbraco.Extensions root = Path.GetFullPath(root); if (!dir.StartsWith(root) && !acceptUnsafe) - throw new ConfigurationErrorsException($"Invalid models directory \"{config}\"."); + throw new ConfigurationException($"Invalid models directory \"{config}\"."); return dir; } @@ -51,7 +51,7 @@ namespace Umbraco.Extensions if (acceptUnsafe) return Path.GetFullPath(config); - throw new ConfigurationErrorsException($"Invalid models directory \"{config}\"."); + throw new ConfigurationException($"Invalid models directory \"{config}\"."); } } } diff --git a/src/Umbraco.Core/Exceptions/ConfigurationException.cs b/src/Umbraco.Core/Exceptions/ConfigurationException.cs new file mode 100644 index 0000000000..fe711a9823 --- /dev/null +++ b/src/Umbraco.Core/Exceptions/ConfigurationException.cs @@ -0,0 +1,41 @@ +using System; +using System.Runtime.Serialization; + +namespace Umbraco.Cms.Core.Exceptions +{ + /// + /// An exception that is thrown if the configuration is wrong. + /// + /// + [Serializable] + public class ConfigurationException : Exception + { + /// + /// Initializes a new instance of the class with a specified error message. + /// + /// The message that describes the error. + public ConfigurationException(string message) + : base(message) + { } + + /// + /// Initializes a new instance of the class with a specified error message + /// and a reference to the inner exception which is the cause of this exception. + /// + /// The message that describes the error. + /// The inner exception, or null. + public ConfigurationException(string message, Exception innerException) + : base(message, innerException) + { } + + /// + /// Initializes a new instance of the class. + /// + /// The that holds the serialized object data about the exception being thrown. + /// The that contains contextual information about the source or destination. + protected ConfigurationException(SerializationInfo info, StreamingContext context) + : base(info, context) + { } + + } +} diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index a0b44b90a2..52b99e58de 100644 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -7,7 +7,7 @@ Umbraco.Cms.Core Umbraco CMS Core Contains the core assembly needed to run Umbraco Cms. This package only contains the assembly, and can be used for package development. Use the template in the Umbraco.Templates package to setup Umbraco - Umbraco CMS + Umbraco CMS @@ -22,7 +22,6 @@ - diff --git a/src/umbraco.sln b/src/umbraco.sln index b32016d97e..0041474014 100644 --- a/src/umbraco.sln +++ b/src/umbraco.sln @@ -37,10 +37,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{B5BD12C1 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NuSpecs", "NuSpecs", "{227C3B55-80E5-4E7E-A802-BE16C5128B9D}" ProjectSection(SolutionItems) = preProject - ..\build\NuSpecs\UmbracoCms.Core.nuspec = ..\build\NuSpecs\UmbracoCms.Core.nuspec ..\build\NuSpecs\UmbracoCms.nuspec = ..\build\NuSpecs\UmbracoCms.nuspec ..\build\NuSpecs\UmbracoCms.SqlCe.nuspec = ..\build\NuSpecs\UmbracoCms.SqlCe.nuspec - ..\build\NuSpecs\UmbracoCms.Web.nuspec = ..\build\NuSpecs\UmbracoCms.Web.nuspec ..\build\NuSpecs\UmbracoCms.Examine.Lucene.nuspec = ..\build\NuSpecs\UmbracoCms.Examine.Lucene.nuspec EndProjectSection EndProject