Skip to content

Commit

Permalink
Merge pull request #4522 from dnnsoftware/release/9.9.0
Browse files Browse the repository at this point in the history
Merges release/9.9.0 into master in order to release
  • Loading branch information
valadas authored Feb 24, 2021
2 parents 6780728 + 4776524 commit 84f1fe5
Show file tree
Hide file tree
Showing 1,935 changed files with 31,166 additions and 25,748 deletions.
29 changes: 29 additions & 0 deletions .github/BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,35 @@ Once you've created this file every time you click "rebuild" in Visual Studio on

For the Webpack projects it is set up to read from the `settings.local.json` file and use the `WebsitePath` to copy generated js files to their right place.

## Build React Projects

The solution includes a number of React projects. Notably for the PersonaBar (`Dnn.AdminExperience/ClientSide/*`). To build these to your development site you
need to use Yarn and scope to the project you're working on. Go to the `package.json` file for the project and find the identifier (name) and use that. So if you're
working on the Site Settings PersonaBar project, you'll find that file here: `Dnn.AdminExperience/ClientSide/SiteSettings.Web/package.json`. Open it up
and you'll see something like this:

``` json
{
"name": "site_settings",
"version": "9.8.1",
"private": true,
...
```

The "key" for this project is "site_settings". Use the following command at the root of the project to build this:

```
yarn watch --scope site_settings
```

and the React project will be built to the dev site and yarn will watch for changes you make and rebuild continuously.

## Gotchas

1. Always check your version in the settings.local.json file if something is not quite right. It is important it is set correctly!
2. After a build to reset your dev site you may find a large number of changed files in Git. You can safely remove all of those changes while you're working on the solution but you must leave the SolutionInfo.cs file intact as it holds the version nr when you press build in Visual Studio!
3. If you're building a React project make sure to disable the caching in your browser so your changed file is loaded!

## Tips and tricks

### Long paths
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ Provide any additional context that may be helpful in understanding and/or resol
Please add X in at least one of the boxes as appropriate. In order for an issue to be accepted, a developer needs to be able to reproduce the issue on a currently supported version. If you are looking for a workaround for an issue with an older version, please visit the forums at https://dnncommunity.org/forums
-->
* [ ] 10.00.00 alpha build
* [ ] 09.08.01 release candidate
* [ ] 09.08.00 latest supported release
* [ ] 09.09.00 release candidate
* [ ] 09.08.01 latest supported release

## Affected browser
<!--
Expand Down
5 changes: 2 additions & 3 deletions Build/Build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Cake.FileHelpers" Version="3.3.0" />
<PackageReference Include="Cake.Frosting" Version="1.0.0-rc0001" />
<PackageReference Include="Cake.Frosting" Version="1.0.0" />
<PackageReference Include="Cake.Git" Version="0.22.0" />
<PackageReference Include="Cake.NuGet" Version="1.0.0-rc0001" />
<PackageReference Include="Cake.XdtTransform" Version="0.18.1" />
<PackageReference Include="Dnn.CakeUtils" Version="1.1.10" />
<PackageReference Include="Dnn.CakeUtils" Version="1.1.11" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.2" />
</ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions Build/Cake/build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ public override void Run(Context context)
[Dependency(typeof(CreateUpgrade))]
[Dependency(typeof(CreateDeploy))]
[Dependency(typeof(CreateSymbols))]
[Dependency(typeof(GeneratePackagesChecksums))]
public sealed class Default : FrostingTask<Context>
{
}
2 changes: 1 addition & 1 deletion Build/Cake/ci.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[Dependency(typeof(CleanArtifacts))]
[Dependency(typeof(UpdateDnnManifests))]
[Dependency(typeof(GenerateChecksum))]
[Dependency(typeof(GenerateSecurityAnalyzerChecksums))]
[Dependency(typeof(SetPackageVersions))]
[Dependency(typeof(CreateInstall))]
[Dependency(typeof(CreateUpgrade))]
Expand Down
45 changes: 45 additions & 0 deletions Build/Cake/packaging.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// The tasks create the various DNN release packages (Install, Upgrade, Deploy and Symbols)

using System;
using System.IO;
using System.Security.Cryptography;
using System.Text;
using Cake.Common.Diagnostics;
using Cake.Common.IO;
using Cake.Frosting;
Expand Down Expand Up @@ -189,3 +192,45 @@ public override void Run(Context context)
}
}
}

[Dependency(typeof(CleanArtifacts))]
[Dependency(typeof(UpdateDnnManifests))]
[Dependency(typeof(CreateInstall))]
[Dependency(typeof(CreateUpgrade))]
[Dependency(typeof(CreateDeploy))]
[Dependency(typeof(CreateSymbols))]
public sealed class GeneratePackagesChecksums : FrostingTask<Context>
{
public override void Run(Context context)
{
context.Information("Computing packages checksums...");

var sb = new StringBuilder();
sb.AppendLine($"## MD5 Checksums")
.AppendLine($"| File | Checksum |")
.AppendLine($"|------------|----------|");

var files = context.GetFilesByPatterns(context.artifactsFolder, new string[] { "*.zip" });
foreach (var file in files)
{
string hash;
var fileName = file.GetFilename();
using (var md5 = MD5.Create())
{
using (var stream = File.OpenRead(file.FullPath))
{
var hashBytes = md5.ComputeHash(stream);
hash = BitConverter.ToString(hashBytes).Replace("-", "").ToLowerInvariant();
}
}

sb.AppendLine($"| {fileName} | {hash} |");
}

sb.AppendLine();
var filePath = Path.Combine(context.artifactsFolder, "checksums.md");
File.WriteAllText(filePath, sb.ToString());

context.Information($"Saved checksums to {filePath}");
}
}
6 changes: 0 additions & 6 deletions Build/Cake/thirdparty.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,5 @@
"folder": "DNN Platform/Components/Microsoft.CodeDom.Providers.DotNetCompilerPlatform/",
"destination": "Install/Library",
"extension": "resources"
},
{
"name": "Microsoft.CodeDom.Providers.DotNetCompilerPlatform_net46",
"folder": "DNN Platform/Components/Microsoft.CodeDom.Providers.DotNetCompilerPlatform-net46/",
"destination": "Install/Library",
"extension": "resources"
}
]
47 changes: 18 additions & 29 deletions Build/Cake/unit-tests.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
using Cake.Common.IO;
using Cake.Common.Tools.MSBuild;
using System.Linq;

using Cake.Common.IO;
using Cake.Common.Tools.VSTest;
using Cake.Common.Tools.VSWhere;
using Cake.Common.Tools.VSWhere.Latest;
using Cake.Core.Diagnostics;
using Cake.Frosting;

/// <summary>
Expand All @@ -14,33 +12,24 @@ public sealed class UnitTests : FrostingTask<Context>
public override void Run(Context context)
{
var testAssemblies = context.GetFiles($@"**\bin\{context.configuration}\DotNetNuke.Tests.*.dll");
testAssemblies -= context.GetFiles(@"**\DotNetNuke.Tests.Data.dll");
testAssemblies -= context.GetFiles(@"**\DotNetNuke.Tests.Integration.dll");
testAssemblies += context.GetFiles($@"**\bin\{context.configuration}\Dnn.PersonaBar.*.Tests.dll");
testAssemblies -= context.GetFiles(@"**\DotNetNuke.Tests.Utilities.dll");

// TODO: address issues to allow these tests to run
testAssemblies -= context.GetFiles(@"**\DotNetNuke.Tests.Integration.dll");
testAssemblies -= context.GetFiles(@"**\DotNetNuke.Tests.Urls.dll");

foreach (var file in testAssemblies)
{
context.VSTest(file.FullPath,
FixToolPath(context, new VSTestSettings()
{
Logger = $"trx;LogFileName={file.GetFilename()}.xml",
Parallel = true,
EnableCodeCoverage = true,
FrameworkVersion = VSTestFrameworkVersion.NET45,
TestAdapterPath = @"tools\NUnitTestAdapter.2.3.0\build"
}));
}
}

// https://github.com/cake-build/cake/issues/1522
VSTestSettings FixToolPath(Context context, VSTestSettings settings)
{
// #tool vswhere
settings.ToolPath =
context.VSWhereLatest(new VSWhereLatestSettings {Requires = "Microsoft.VisualStudio.PackageGroup.TestTools.Core"})
.CombineWithFilePath(context.File(@"Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe"));
return settings;
var vsTestPath = context.GetFiles("tools/Microsoft.TestPlatform.16.8.0/tools/**/vstest.console.exe").First();
context.VSTest(
testAssemblies,
new VSTestSettings
{
ToolPath = vsTestPath,
Logger = "trx",
Parallel = true,
EnableCodeCoverage = true,
TestAdapterPath = @"tools\NUnitTestAdapter.2.3.0\build"
});
}
}

2 changes: 1 addition & 1 deletion Build/Cake/version.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public override void Run(Context context)
}

[Dependency(typeof(SetVersion))]
public sealed class GenerateChecksum : FrostingTask<Context>
public sealed class GenerateSecurityAnalyzerChecksums : FrostingTask<Context>
{
public override void Run(Context context)
{
Expand Down
42 changes: 12 additions & 30 deletions Build/Program.cs
Original file line number Diff line number Diff line change
@@ -1,38 +1,20 @@
using System;
using System.Collections.Generic;
using System.IO;
using Cake.Core;
using Cake.Core.Configuration;

using Cake.Frosting;
using Cake.NuGet;

public class Program : IFrostingStartup
public class Program
{
public static int Main(string[] args)
{
// Create the host.
var host = new CakeHostBuilder()
.WithArguments(args)
.UseStartup<Program>()
.Build();

// Run the host.
return host.Run();
}

public void Configure(ICakeServices services)
{
services.UseContext<Context>();
services.UseLifetime<Lifetime>();
services.UseWorkingDirectory("..");

// from https://github.com/cake-build/cake/discussions/2931
var module = new NuGetModule(new CakeConfiguration(new Dictionary<string, string>()));
module.Register(services);

services.UseTool(new Uri("nuget:?package=GitVersion.CommandLine&version=5.0.1"));
services.UseTool(new Uri("nuget:?package=Microsoft.TestPlatform&version=16.8.0"));
services.UseTool(new Uri("nuget:?package=NUnitTestAdapter&version=2.3.0"));
services.UseTool(new Uri("nuget:?package=NuGet.CommandLine&version=5.8.0"));
return new CakeHost()
.UseContext<Context>()
.UseLifetime<Lifetime>()
.UseWorkingDirectory("..")
.SetToolPath("../tools")
.InstallTool(new Uri("nuget:?package=GitVersion.CommandLine&version=5.0.1"))
.InstallTool(new Uri("nuget:?package=Microsoft.TestPlatform&version=16.8.0"))
.InstallTool(new Uri("nuget:?package=NUnitTestAdapter&version=2.3.0"))
.InstallTool(new Uri("nuget:?package=NuGet.CommandLine&version=5.8.0"))
.Run(args);
}
}
2 changes: 1 addition & 1 deletion Build/Symbols/DotNetNuke_Symbols.dnn
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<dotnetnuke type="Package" version="5.0">
<packages>
<package name="DotNetNuke_Symbols" type="Library" version="09.08.01" >
<package name="DotNetNuke_Symbols" type="Library" version="09.09.00" >
<friendlyName>DNN Platform Symbols</friendlyName>
<description>This package contains Debug Symbols and Intellisense files for DNN Platform.</description>
<owner>
Expand Down
43 changes: 20 additions & 23 deletions Build/Symbols/license.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
The MIT License (MIT)<br/>
<br/>
Copyright (c) .NET Foundation and Contributors<br/>
<br/>
All Rights Reserved<br/>
<br/>
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:<br/>
<br/>
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.<br/>
<br/>
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.<br/>
<div class="License">
<h3>License</h3>
<p class="Owner">
Copyright (c) .NET Foundation and Contributors<br />
All Rights Reserved
</p>
<p>
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:
</p>
<p>
The above copyright notice and this permission notice shall be included in all copies or substantial portions
of the Software.
</p>
<p>
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 NON-INFRINGEMENT. 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.
</p>
</div>
1 change: 1 addition & 0 deletions Build/Tools/NuGet/DotNetNuke.DependencyInjection.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<copyright>Copyright (c) .NET Foundation and Contributors, All Rights Reserved.</copyright>
<dependencies>
<dependency id="Microsoft.Extensions.DependencyInjection" version="2.1.1" />
<dependency id="DotNetNuke.Instrumentation" version="$version$" />
</dependencies>
</metadata>
<files>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<dotnetnuke type="Package" version="5.0">
<packages>
<package name="DotNetNuke.Console" type="Module" version="09.08.01">
<package name="DotNetNuke.Console" type="Module" version="09.09.00">
<friendlyName>Console</friendlyName>
<description>Display children pages as icon links for navigation.</description>
<iconFile>~/DesktopModules/Admin/Console/console.png</iconFile>
Expand Down
43 changes: 20 additions & 23 deletions DNN Platform/Admin Modules/Dnn.Modules.Console/license.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
The MIT License (MIT)<br/>
<br/>
Copyright (c) .NET Foundation and Contributors<br/>
<br/>
All Rights Reserved<br/>
<br/>
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:<br/>
<br/>
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.<br/>
<br/>
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.<br/>
<div class="License">
<h3>License</h3>
<p class="Owner">
Copyright (c) .NET Foundation and Contributors<br />
All Rights Reserved
</p>
<p>
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:
</p>
<p>
The above copyright notice and this permission notice shall be included in all copies or substantial portions
of the Software.
</p>
<p>
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 NON-INFRINGEMENT. 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.
</p>
</div>
Loading

0 comments on commit 84f1fe5

Please sign in to comment.