diff --git a/Build/Tasks/OtherPackages.cs b/Build/Tasks/OtherPackages.cs index 323a266fe3c..45784a1754c 100644 --- a/Build/Tasks/OtherPackages.cs +++ b/Build/Tasks/OtherPackages.cs @@ -21,6 +21,7 @@ namespace DotNetNuke.Build.Tasks [Dependency(typeof(PackageAspNetWebApi))] [Dependency(typeof(PackageAspNetWebPages))] [Dependency(typeof(PackageAspNetMvc))] + [Dependency(typeof(PackageMicrosoftGlobbing))] public sealed class OtherPackages : FrostingTask { /// diff --git a/Build/Tasks/PackageMicrosoftGlobbing.cs b/Build/Tasks/PackageMicrosoftGlobbing.cs new file mode 100644 index 00000000000..2f2b49da085 --- /dev/null +++ b/Build/Tasks/PackageMicrosoftGlobbing.cs @@ -0,0 +1,68 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information +namespace DotNetNuke.Build.Tasks +{ + using System.Diagnostics; + using System.Linq; + using System.Xml; + + using Cake.Common.Diagnostics; + using Cake.Common.IO; + using Cake.Frosting; + using Dnn.CakeUtils; + + /// A cake task to generate the ASP.NET MVC package. + public sealed class PackageMicrosoftGlobbing : FrostingTask + { + /// + public override void Run(Context context) + { + var binDir = context.WebsiteDir.Path.Combine("bin"); + var mainAssemblyPath = binDir.CombineWithFilePath("Microsoft.Extensions.FileSystemGlobbing.dll"); + var packageVersion = FileVersionInfo.GetVersionInfo(context.MakeAbsolute(mainAssemblyPath).FullPath).FileVersion; + + var packageZip = context.WebsiteDir.Path.CombineWithFilePath($"Install/Library/MicrosoftGlobbing_{packageVersion}_Install.zip"); + var packageDir = context.Directory("DNN Platform/Components/Microsoft.Extensions.FileSystemGlobbing"); + + context.Information($"Creating {packageZip}"); + context.Zip( + packageDir.ToString(), + packageZip, + context.GetFilesByPatterns(packageDir, new[] { "*" }, new[] { "*.dnn" })); + + var manifestPath = context.GetFiles(packageDir.Path.CombineWithFilePath("*.dnn").ToString()).Single(); + context.Information($"Reading manifest from {manifestPath}"); + var manifest = new XmlDocument(); + manifest.LoadXml(context.ReadFile(manifestPath)); + var assemblies = + from XmlNode assemblyNode in manifest.SelectNodes("//assembly") + from XmlNode childNode in assemblyNode.ChildNodes + where childNode.LocalName.Equals("name") + select childNode; + + foreach (var assemblyNameNode in assemblies) + { + var assemblyPath = binDir.CombineWithFilePath(assemblyNameNode.InnerText); + context.Information($"Adding {assemblyPath} to {packageZip}"); + context.AddFilesToZip( + packageZip, + context.MakeAbsolute(context.WebsiteDir.Path), + context.GetFiles(assemblyPath.ToString()), + append: true); + + var versionNode = assemblyNameNode.ParentNode.ChildNodes.Cast() + .SingleOrDefault(childNode => childNode.LocalName.Equals("version")); + if (versionNode != null) + { + versionNode.InnerText = FileVersionInfo.GetVersionInfo(context.MakeAbsolute(assemblyPath).FullPath).FileVersion; + context.Information($"Set {assemblyPath} version to {versionNode.InnerText}"); + } + } + + manifest.SelectSingleNode("//package[@version]").Attributes["version"].Value = packageVersion; + + context.AddXmlFileToZip(packageZip, manifest, manifestPath.GetFilename().ToString(), append: true); + } + } +} diff --git a/Build/Tasks/packaging.json b/Build/Tasks/packaging.json index dd03fe0c3fb..a74acbad267 100644 --- a/Build/Tasks/packaging.json +++ b/Build/Tasks/packaging.json @@ -67,6 +67,7 @@ "/bin/Newtonsoft*", "/bin/SchwabenCode*", "/bin/System*", - "/bin/WebFormsMvp*" + "/bin/WebFormsMvp*", + "/bin/Microsoft.Extensions.FileSystemGlobbing*" ] } diff --git a/Build/Tasks/thirdparty.json b/Build/Tasks/thirdparty.json index 0a7c758ee46..097c8d7dc97 100644 --- a/Build/Tasks/thirdparty.json +++ b/Build/Tasks/thirdparty.json @@ -3,7 +3,7 @@ "name": "Telerik", "folder": "DNN Platform/Components/Telerik/", "destination": "Install/Module", - "excludes": ["**/*.xml"] + "excludes": [ "**/*.xml" ] }, { "name": "jQuery", @@ -40,5 +40,11 @@ "folder": "DNN Platform/Components/Microsoft.CodeDom.Providers.DotNetCompilerPlatform/", "destination": "Install/Library", "extension": "resources" + }, + { + "name": "Telerik", + "folder": "DNN Platform/Components/Microsoft.Extensions.FileSystemGlobbing/", + "destination": "Install/Module", + "excludes": [ "**/*.xml" ] } ] diff --git a/DNN Platform/Components/Microsoft.Extensions.FileSystemGlobbing/License.txt b/DNN Platform/Components/Microsoft.Extensions.FileSystemGlobbing/License.txt new file mode 100644 index 00000000000..9d087925144 --- /dev/null +++ b/DNN Platform/Components/Microsoft.Extensions.FileSystemGlobbing/License.txt @@ -0,0 +1,23 @@ +The MIT License (MIT) + +Copyright (c) .NET Foundation and Contributors + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/DNN Platform/Components/Microsoft.Extensions.FileSystemGlobbing/Microsoft.Extensions.FileSystemGlobbing.dnn b/DNN Platform/Components/Microsoft.Extensions.FileSystemGlobbing/Microsoft.Extensions.FileSystemGlobbing.dnn new file mode 100644 index 00000000000..31d029cbbd0 --- /dev/null +++ b/DNN Platform/Components/Microsoft.Extensions.FileSystemGlobbing/Microsoft.Extensions.FileSystemGlobbing.dnn @@ -0,0 +1,30 @@ + + + + Newtonsoft Json Components + Provides Newtonsoft Json Components for DotNetNuke. + + + DNN + .NET Foundation + https://dnncommunity.org + info@dnncommunity.org + + License.txt + + This package includes Microsoft.Extensions.FileSystemGlobbing assembly version 5.0.0. + Please go to https://github.com/dotnet/runtime to view release notes on this particular version. + + + + + bin + Microsoft.Extensions.FileSystemGlobbing.dll + 5.0.0 + + + + + + + diff --git a/DNN Platform/Library/DotNetNuke.Library.csproj b/DNN Platform/Library/DotNetNuke.Library.csproj index 38cf49ecb89..3737b06d737 100644 --- a/DNN Platform/Library/DotNetNuke.Library.csproj +++ b/DNN Platform/Library/DotNetNuke.Library.csproj @@ -116,8 +116,8 @@ ..\..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.2.1.1\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll - - ..\..\packages\Microsoft.Extensions.FileSystemGlobbing.3.1.1\lib\netstandard2.0\Microsoft.Extensions.FileSystemGlobbing.dll + + ..\..\packages\Microsoft.Extensions.FileSystemGlobbing.5.0.0\lib\net461\Microsoft.Extensions.FileSystemGlobbing.dll diff --git a/DNN Platform/Library/packages.config b/DNN Platform/Library/packages.config index 32e177d0c6e..573783eb33c 100644 --- a/DNN Platform/Library/packages.config +++ b/DNN Platform/Library/packages.config @@ -7,7 +7,7 @@ - + diff --git a/DNN_Platform.sln b/DNN_Platform.sln index bce79f57e9f..5f0368ee67e 100644 --- a/DNN_Platform.sln +++ b/DNN_Platform.sln @@ -521,6 +521,55 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Build", "Build\Build.csproj EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dnn.PersonaBar.ConfigConsole.Tests", "Dnn.AdminExperience\Tests\Dnn.PersonaBar.ConfigConsole.Tests\Dnn.PersonaBar.ConfigConsole.Tests.csproj", "{12583A7E-7BEF-4F79-9CEA-3736D28C3241}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Components", "Components", "{A193D0F9-C722-44BD-B209-2AA2F25C9816}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MailKit", "MailKit", "{88B6C3F7-8E53-4338-A7F9-40EEE18374C0}" + ProjectSection(SolutionItems) = preProject + DNN Platform\Components\MailKit\License.txt = DNN Platform\Components\MailKit\License.txt + DNN Platform\Components\MailKit\MailKit.dnn = DNN Platform\Components\MailKit\MailKit.dnn + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.AspNetMvc", "Microsoft.AspNetMvc", "{EC500979-80C0-4FD2-9B7E-5EB978D6D69C}" + ProjectSection(SolutionItems) = preProject + DNN Platform\Components\Microsoft.AspNetMvc\License.txt = DNN Platform\Components\Microsoft.AspNetMvc\License.txt + DNN Platform\Components\Microsoft.AspNetMvc\Microsoft.AspNetMvc.dnn = DNN Platform\Components\Microsoft.AspNetMvc\Microsoft.AspNetMvc.dnn + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.AspNetWebApi", "Microsoft.AspNetWebApi", "{4C5DD300-BCDF-44A2-A3DF-EC8D3E0788D2}" + ProjectSection(SolutionItems) = preProject + DNN Platform\Components\Microsoft.AspNetWebApi\License.txt = DNN Platform\Components\Microsoft.AspNetWebApi\License.txt + DNN Platform\Components\Microsoft.AspNetWebApi\Microsoft.AspNetWebApi.dnn = DNN Platform\Components\Microsoft.AspNetWebApi\Microsoft.AspNetWebApi.dnn + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.AspNetWebPages", "Microsoft.AspNetWebPages", "{881A75D6-DA09-4ADD-9B5B-ACAFE8962D3B}" + ProjectSection(SolutionItems) = preProject + DNN Platform\Components\Microsoft.AspNetWebPages\License.txt = DNN Platform\Components\Microsoft.AspNetWebPages\License.txt + DNN Platform\Components\Microsoft.AspNetWebPages\Microsoft.AspNetWebPages.dnn = DNN Platform\Components\Microsoft.AspNetWebPages\Microsoft.AspNetWebPages.dnn + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.CodeDom.Providers.DotNetCompilerPlatform", "Microsoft.CodeDom.Providers.DotNetCompilerPlatform", "{F3E526A3-3420-4B0B-9C31-FD813CCD83F7}" + ProjectSection(SolutionItems) = preProject + DNN Platform\Components\Microsoft.CodeDom.Providers.DotNetCompilerPlatform\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dnn = DNN Platform\Components\Microsoft.CodeDom.Providers.DotNetCompilerPlatform\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dnn + DNN Platform\Components\Microsoft.CodeDom.Providers.DotNetCompilerPlatform\releaseNotes.txt = DNN Platform\Components\Microsoft.CodeDom.Providers.DotNetCompilerPlatform\releaseNotes.txt + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Newtonsoft", "Newtonsoft", "{CBBA26D2-68FF-4FDB-BD9E-17D4C2CE717F}" + ProjectSection(SolutionItems) = preProject + DNN Platform\Components\Newtonsoft\DotNetNuke.Newtonsoft.Json.dnn = DNN Platform\Components\Newtonsoft\DotNetNuke.Newtonsoft.Json.dnn + DNN Platform\Components\Newtonsoft\License.txt = DNN Platform\Components\Newtonsoft\License.txt + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Telerik", "Telerik", "{6395573E-D778-4DBE-BD22-A39273DBF0C9}" + ProjectSection(SolutionItems) = preProject + DNN Platform\Components\Telerik\DotNetNuke.Telerik.Web.dnn = DNN Platform\Components\Telerik\DotNetNuke.Telerik.Web.dnn + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.Extensions.FileSystemGlobbing", "Microsoft.Extensions.FileSystemGlobbing", "{890623E0-F6C8-4011-9FAF-00939601EBE8}" + ProjectSection(SolutionItems) = preProject + DNN Platform\Components\Microsoft.Extensions.FileSystemGlobbing\License.txt = DNN Platform\Components\Microsoft.Extensions.FileSystemGlobbing\License.txt + DNN Platform\Components\Microsoft.Extensions.FileSystemGlobbing\Microsoft.Extensions.FileSystemGlobbing.dnn = DNN Platform\Components\Microsoft.Extensions.FileSystemGlobbing\Microsoft.Extensions.FileSystemGlobbing.dnn + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Cloud_Debug|Any CPU = Cloud_Debug|Any CPU @@ -2144,6 +2193,15 @@ Global {7B43D266-D6E1-4496-A9A1-487AFEE0D9C0} = {9A986091-4238-4804-8C86-6A9A005F72C2} {22E535CC-385B-44BB-998D-A3C0A144F9E1} = {29273BE6-1AA8-4970-98A0-41BFFEEDA67B} {12583A7E-7BEF-4F79-9CEA-3736D28C3241} = {8EB4193C-A708-4DA0-9F2A-F5B7599F6F8F} + {A193D0F9-C722-44BD-B209-2AA2F25C9816} = {FBD3B3FB-C9A6-43D2-8FE7-6A0A19DF0D0C} + {88B6C3F7-8E53-4338-A7F9-40EEE18374C0} = {A193D0F9-C722-44BD-B209-2AA2F25C9816} + {EC500979-80C0-4FD2-9B7E-5EB978D6D69C} = {A193D0F9-C722-44BD-B209-2AA2F25C9816} + {4C5DD300-BCDF-44A2-A3DF-EC8D3E0788D2} = {A193D0F9-C722-44BD-B209-2AA2F25C9816} + {881A75D6-DA09-4ADD-9B5B-ACAFE8962D3B} = {A193D0F9-C722-44BD-B209-2AA2F25C9816} + {F3E526A3-3420-4B0B-9C31-FD813CCD83F7} = {A193D0F9-C722-44BD-B209-2AA2F25C9816} + {CBBA26D2-68FF-4FDB-BD9E-17D4C2CE717F} = {A193D0F9-C722-44BD-B209-2AA2F25C9816} + {6395573E-D778-4DBE-BD22-A39273DBF0C9} = {A193D0F9-C722-44BD-B209-2AA2F25C9816} + {890623E0-F6C8-4011-9FAF-00939601EBE8} = {A193D0F9-C722-44BD-B209-2AA2F25C9816} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {46B6A641-57EB-4B19-B199-23E6FC2AB40B} diff --git a/Dnn.AdminExperience/Library/Dnn.PersonaBar.Library/app.config b/Dnn.AdminExperience/Library/Dnn.PersonaBar.Library/app.config index faeaf001de7..91e4a216beb 100644 --- a/Dnn.AdminExperience/Library/Dnn.PersonaBar.Library/app.config +++ b/Dnn.AdminExperience/Library/Dnn.PersonaBar.Library/app.config @@ -6,6 +6,10 @@ + + + + \ No newline at end of file