Skip to content

Commit 84f1fe5

Browse files
authored
Merge pull request #4522 from dnnsoftware/release/9.9.0
Merges release/9.9.0 into master in order to release
2 parents 6780728 + 4776524 commit 84f1fe5

File tree

1,935 files changed

+31166
-25748
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,935 files changed

+31166
-25748
lines changed

.github/BUILD.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,35 @@ Once you've created this file every time you click "rebuild" in Visual Studio on
111111

112112
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.
113113

114+
## Build React Projects
115+
116+
The solution includes a number of React projects. Notably for the PersonaBar (`Dnn.AdminExperience/ClientSide/*`). To build these to your development site you
117+
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
118+
working on the Site Settings PersonaBar project, you'll find that file here: `Dnn.AdminExperience/ClientSide/SiteSettings.Web/package.json`. Open it up
119+
and you'll see something like this:
120+
121+
``` json
122+
{
123+
"name": "site_settings",
124+
"version": "9.8.1",
125+
"private": true,
126+
...
127+
```
128+
129+
The "key" for this project is "site_settings". Use the following command at the root of the project to build this:
130+
131+
```
132+
yarn watch --scope site_settings
133+
```
134+
135+
and the React project will be built to the dev site and yarn will watch for changes you make and rebuild continuously.
136+
137+
## Gotchas
138+
139+
1. Always check your version in the settings.local.json file if something is not quite right. It is important it is set correctly!
140+
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!
141+
3. If you're building a React project make sure to disable the caching in your browser so your changed file is loaded!
142+
114143
## Tips and tricks
115144

116145
### Long paths

.github/ISSUE_TEMPLATE/bug-report.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ Provide any additional context that may be helpful in understanding and/or resol
4141
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
4242
-->
4343
* [ ] 10.00.00 alpha build
44-
* [ ] 09.08.01 release candidate
45-
* [ ] 09.08.00 latest supported release
44+
* [ ] 09.09.00 release candidate
45+
* [ ] 09.08.01 latest supported release
4646

4747
## Affected browser
4848
<!--

Build/Build.csproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@
88
</PropertyGroup>
99
<ItemGroup>
1010
<PackageReference Include="Cake.FileHelpers" Version="3.3.0" />
11-
<PackageReference Include="Cake.Frosting" Version="1.0.0-rc0001" />
11+
<PackageReference Include="Cake.Frosting" Version="1.0.0" />
1212
<PackageReference Include="Cake.Git" Version="0.22.0" />
13-
<PackageReference Include="Cake.NuGet" Version="1.0.0-rc0001" />
1413
<PackageReference Include="Cake.XdtTransform" Version="0.18.1" />
15-
<PackageReference Include="Dnn.CakeUtils" Version="1.1.10" />
14+
<PackageReference Include="Dnn.CakeUtils" Version="1.1.11" />
1615
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
1716
<PackageReference Include="System.Data.SqlClient" Version="4.8.2" />
1817
</ItemGroup>

Build/Cake/build.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ public override void Run(Context context)
222222
[Dependency(typeof(CreateUpgrade))]
223223
[Dependency(typeof(CreateDeploy))]
224224
[Dependency(typeof(CreateSymbols))]
225+
[Dependency(typeof(GeneratePackagesChecksums))]
225226
public sealed class Default : FrostingTask<Context>
226227
{
227228
}

Build/Cake/ci.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
[Dependency(typeof(CleanArtifacts))]
66
[Dependency(typeof(UpdateDnnManifests))]
7-
[Dependency(typeof(GenerateChecksum))]
7+
[Dependency(typeof(GenerateSecurityAnalyzerChecksums))]
88
[Dependency(typeof(SetPackageVersions))]
99
[Dependency(typeof(CreateInstall))]
1010
[Dependency(typeof(CreateUpgrade))]

Build/Cake/packaging.cs

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
// The tasks create the various DNN release packages (Install, Upgrade, Deploy and Symbols)
22

33
using System;
4+
using System.IO;
5+
using System.Security.Cryptography;
6+
using System.Text;
47
using Cake.Common.Diagnostics;
58
using Cake.Common.IO;
69
using Cake.Frosting;
@@ -189,3 +192,45 @@ public override void Run(Context context)
189192
}
190193
}
191194
}
195+
196+
[Dependency(typeof(CleanArtifacts))]
197+
[Dependency(typeof(UpdateDnnManifests))]
198+
[Dependency(typeof(CreateInstall))]
199+
[Dependency(typeof(CreateUpgrade))]
200+
[Dependency(typeof(CreateDeploy))]
201+
[Dependency(typeof(CreateSymbols))]
202+
public sealed class GeneratePackagesChecksums : FrostingTask<Context>
203+
{
204+
public override void Run(Context context)
205+
{
206+
context.Information("Computing packages checksums...");
207+
208+
var sb = new StringBuilder();
209+
sb.AppendLine($"## MD5 Checksums")
210+
.AppendLine($"| File | Checksum |")
211+
.AppendLine($"|------------|----------|");
212+
213+
var files = context.GetFilesByPatterns(context.artifactsFolder, new string[] { "*.zip" });
214+
foreach (var file in files)
215+
{
216+
string hash;
217+
var fileName = file.GetFilename();
218+
using (var md5 = MD5.Create())
219+
{
220+
using (var stream = File.OpenRead(file.FullPath))
221+
{
222+
var hashBytes = md5.ComputeHash(stream);
223+
hash = BitConverter.ToString(hashBytes).Replace("-", "").ToLowerInvariant();
224+
}
225+
}
226+
227+
sb.AppendLine($"| {fileName} | {hash} |");
228+
}
229+
230+
sb.AppendLine();
231+
var filePath = Path.Combine(context.artifactsFolder, "checksums.md");
232+
File.WriteAllText(filePath, sb.ToString());
233+
234+
context.Information($"Saved checksums to {filePath}");
235+
}
236+
}

Build/Cake/thirdparty.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,5 @@
4040
"folder": "DNN Platform/Components/Microsoft.CodeDom.Providers.DotNetCompilerPlatform/",
4141
"destination": "Install/Library",
4242
"extension": "resources"
43-
},
44-
{
45-
"name": "Microsoft.CodeDom.Providers.DotNetCompilerPlatform_net46",
46-
"folder": "DNN Platform/Components/Microsoft.CodeDom.Providers.DotNetCompilerPlatform-net46/",
47-
"destination": "Install/Library",
48-
"extension": "resources"
4943
}
5044
]

Build/Cake/unit-tests.cs

Lines changed: 18 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
using Cake.Common.IO;
2-
using Cake.Common.Tools.MSBuild;
1+
using System.Linq;
2+
3+
using Cake.Common.IO;
34
using Cake.Common.Tools.VSTest;
4-
using Cake.Common.Tools.VSWhere;
5-
using Cake.Common.Tools.VSWhere.Latest;
6-
using Cake.Core.Diagnostics;
75
using Cake.Frosting;
86

97
/// <summary>
@@ -14,33 +12,24 @@ public sealed class UnitTests : FrostingTask<Context>
1412
public override void Run(Context context)
1513
{
1614
var testAssemblies = context.GetFiles($@"**\bin\{context.configuration}\DotNetNuke.Tests.*.dll");
17-
testAssemblies -= context.GetFiles(@"**\DotNetNuke.Tests.Data.dll");
18-
testAssemblies -= context.GetFiles(@"**\DotNetNuke.Tests.Integration.dll");
15+
testAssemblies += context.GetFiles($@"**\bin\{context.configuration}\Dnn.PersonaBar.*.Tests.dll");
1916
testAssemblies -= context.GetFiles(@"**\DotNetNuke.Tests.Utilities.dll");
17+
18+
// TODO: address issues to allow these tests to run
19+
testAssemblies -= context.GetFiles(@"**\DotNetNuke.Tests.Integration.dll");
2020
testAssemblies -= context.GetFiles(@"**\DotNetNuke.Tests.Urls.dll");
2121

22-
foreach (var file in testAssemblies)
23-
{
24-
context.VSTest(file.FullPath,
25-
FixToolPath(context, new VSTestSettings()
26-
{
27-
Logger = $"trx;LogFileName={file.GetFilename()}.xml",
28-
Parallel = true,
29-
EnableCodeCoverage = true,
30-
FrameworkVersion = VSTestFrameworkVersion.NET45,
31-
TestAdapterPath = @"tools\NUnitTestAdapter.2.3.0\build"
32-
}));
33-
}
34-
}
35-
36-
// https://github.com/cake-build/cake/issues/1522
37-
VSTestSettings FixToolPath(Context context, VSTestSettings settings)
38-
{
39-
// #tool vswhere
40-
settings.ToolPath =
41-
context.VSWhereLatest(new VSWhereLatestSettings {Requires = "Microsoft.VisualStudio.PackageGroup.TestTools.Core"})
42-
.CombineWithFilePath(context.File(@"Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe"));
43-
return settings;
22+
var vsTestPath = context.GetFiles("tools/Microsoft.TestPlatform.16.8.0/tools/**/vstest.console.exe").First();
23+
context.VSTest(
24+
testAssemblies,
25+
new VSTestSettings
26+
{
27+
ToolPath = vsTestPath,
28+
Logger = "trx",
29+
Parallel = true,
30+
EnableCodeCoverage = true,
31+
TestAdapterPath = @"tools\NUnitTestAdapter.2.3.0\build"
32+
});
4433
}
4534
}
4635

Build/Cake/version.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public override void Run(Context context)
135135
}
136136

137137
[Dependency(typeof(SetVersion))]
138-
public sealed class GenerateChecksum : FrostingTask<Context>
138+
public sealed class GenerateSecurityAnalyzerChecksums : FrostingTask<Context>
139139
{
140140
public override void Run(Context context)
141141
{

Build/Program.cs

Lines changed: 12 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,20 @@
11
using System;
2-
using System.Collections.Generic;
3-
using System.IO;
4-
using Cake.Core;
5-
using Cake.Core.Configuration;
2+
63
using Cake.Frosting;
7-
using Cake.NuGet;
84

9-
public class Program : IFrostingStartup
5+
public class Program
106
{
117
public static int Main(string[] args)
128
{
13-
// Create the host.
14-
var host = new CakeHostBuilder()
15-
.WithArguments(args)
16-
.UseStartup<Program>()
17-
.Build();
18-
19-
// Run the host.
20-
return host.Run();
21-
}
22-
23-
public void Configure(ICakeServices services)
24-
{
25-
services.UseContext<Context>();
26-
services.UseLifetime<Lifetime>();
27-
services.UseWorkingDirectory("..");
28-
29-
// from https://github.com/cake-build/cake/discussions/2931
30-
var module = new NuGetModule(new CakeConfiguration(new Dictionary<string, string>()));
31-
module.Register(services);
32-
33-
services.UseTool(new Uri("nuget:?package=GitVersion.CommandLine&version=5.0.1"));
34-
services.UseTool(new Uri("nuget:?package=Microsoft.TestPlatform&version=16.8.0"));
35-
services.UseTool(new Uri("nuget:?package=NUnitTestAdapter&version=2.3.0"));
36-
services.UseTool(new Uri("nuget:?package=NuGet.CommandLine&version=5.8.0"));
9+
return new CakeHost()
10+
.UseContext<Context>()
11+
.UseLifetime<Lifetime>()
12+
.UseWorkingDirectory("..")
13+
.SetToolPath("../tools")
14+
.InstallTool(new Uri("nuget:?package=GitVersion.CommandLine&version=5.0.1"))
15+
.InstallTool(new Uri("nuget:?package=Microsoft.TestPlatform&version=16.8.0"))
16+
.InstallTool(new Uri("nuget:?package=NUnitTestAdapter&version=2.3.0"))
17+
.InstallTool(new Uri("nuget:?package=NuGet.CommandLine&version=5.8.0"))
18+
.Run(args);
3719
}
3820
}

0 commit comments

Comments
 (0)