From 130af450a762ebb77d5dfd4b4bcf141d431c9fb5 Mon Sep 17 00:00:00 2001 From: Marko Lahma Date: Thu, 30 Jul 2026 11:22:07 +0300 Subject: [PATCH 1/4] Modernize the project files and produce the package with `dotnet pack` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaces the hand-maintained nuspec with SDK packaging, so the dependency groups follow the real TargetFrameworks. The nuspec had drifted: it declared net6.0 and net7.0 groups that are not built, and no group for net10.0, which is shipped. Drops Microsoft.SourceLink.GitHub — SourceLink ships in the .NET SDK since 8.0.100 and the repository metadata (branch, commit) now lands in the package without it. Centralizes package versions in src/Directory.Packages.props. AngleSharp and Jint are stated as ranges because `dotnet pack` publishes them verbatim; the 2.0 / 5.0 ceilings the nuspec carried are preserved, and the ceiling now holds even when CI overrides the floor via -AngleSharpVersion. Points the test project at net10.0 and drops the netstandard2.0 pin on its ProjectReference, so tests exercise the library build they ship against rather than always the netstandard2.0 one. Also converts the solution to .slnx (which drops four orphaned project-config blocks), moves both AssemblyInfo.cs files into the csproj, adds a global.json, and upgrades NUKE to 10.1.0. The produced package is byte-comparable to the one devel produces, apart from the net10.0 group being added, the dead net6.0/net7.0 groups being removed, and SourceLink metadata being present. Assembly identity is unchanged: Version=1.0.0.0, PublicKeyToken=e83494dcdc6d31ea. Co-Authored-By: Claude Opus 5 (1M context) --- .nuke/build.schema.json | 1 - .nuke/parameters.json | 2 +- AGENTS.md | 29 +++++----- global.json | 6 +++ nuke/Build.cs | 53 ++++++++----------- nuke/_build.csproj | 7 +-- .../AngleSharp.Js.Tests.csproj | 22 ++++---- .../Properties/AssemblyInfo.cs | 7 --- src/AngleSharp.Js.nuspec | 45 ---------------- src/AngleSharp.Js.sln | 46 ---------------- src/AngleSharp.Js.slnx | 9 ++++ src/AngleSharp.Js/AngleSharp.Js.csproj | 29 ++++++---- src/AngleSharp.Js/Properties/AssemblyInfo.cs | 7 --- src/Directory.Build.props | 38 ++++++++++--- src/Directory.Packages.props | 23 ++++++++ 15 files changed, 141 insertions(+), 183 deletions(-) create mode 100644 global.json delete mode 100644 src/AngleSharp.Js.Tests/Properties/AssemblyInfo.cs delete mode 100644 src/AngleSharp.Js.nuspec delete mode 100644 src/AngleSharp.Js.sln create mode 100644 src/AngleSharp.Js.slnx delete mode 100644 src/AngleSharp.Js/Properties/AssemblyInfo.cs create mode 100644 src/Directory.Packages.props diff --git a/.nuke/build.schema.json b/.nuke/build.schema.json index 83a628f..29c138d 100644 --- a/.nuke/build.schema.json +++ b/.nuke/build.schema.json @@ -26,7 +26,6 @@ "enum": [ "Clean", "Compile", - "CopyFiles", "CreatePackage", "Default", "Package", diff --git a/.nuke/parameters.json b/.nuke/parameters.json index 4dcccaa..08b0fe3 100644 --- a/.nuke/parameters.json +++ b/.nuke/parameters.json @@ -1,4 +1,4 @@ { "$schema": "./build.schema.json", - "Solution": "src/AngleSharp.Js.sln" + "Solution": "src/AngleSharp.Js.slnx" } \ No newline at end of file diff --git a/AGENTS.md b/AGENTS.md index f78f1f2..6d49f14 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -16,27 +16,32 @@ The orchestrator is NUKE (`nuke/Build.cs`), bootstrapped by `build.ps1` / `build ```powershell .\build.ps1 # restore, compile, run the full test suite .\build.ps1 -Target Compile # other targets: Clean Restore Compile RunUnitTests -.\build.ps1 -Target Package # CopyFiles CreatePackage Package PrePublish Publish +.\build.ps1 -Target Package # CreatePackage Package PrePublish Publish ``` For the normal edit/test loop use the SDK directly — much faster than the NUKE bootstrap: ```powershell -dotnet build src/AngleSharp.Js.sln -dotnet test src/AngleSharp.Js.Tests/AngleSharp.Js.Tests.csproj -f net8.0 -dotnet test src/AngleSharp.Js.Tests/AngleSharp.Js.Tests.csproj -f net8.0 --filter "FullyQualifiedName~InstanceOfTests" -dotnet test src/AngleSharp.Js.Tests/AngleSharp.Js.Tests.csproj -f net8.0 --filter "Name=WindowIsAnInstanceOfWindow" +dotnet build src/AngleSharp.Js.slnx +dotnet test src/AngleSharp.Js.Tests/AngleSharp.Js.Tests.csproj -f net10.0 +dotnet test src/AngleSharp.Js.Tests/AngleSharp.Js.Tests.csproj -f net10.0 --filter "FullyQualifiedName~InstanceOfTests" +dotnet test src/AngleSharp.Js.Tests/AngleSharp.Js.Tests.csproj -f net10.0 --filter "Name=WindowIsAnInstanceOfWindow" ``` -- Always pass `-f net8.0` when iterating. On Windows both projects also target `net462` and - `net472`, so omitting it runs everything three times. +- Always pass `-f net10.0` when iterating. On Windows the test project also targets `net462` + and `net472`, so omitting it runs everything three times. - `TreatWarningsAsErrors` is on (`src/Directory.Build.props`) — a warning breaks the build. There is no separate lint step; the compiler is it. -- The package version is parsed from the top entry of `CHANGELOG.md` (`ReleaseNotesParser`), - not from a csproj property. Release-worthy changes get a `CHANGELOG.md` line. +- Package versions are centralized in `src/Directory.Packages.props` (CPM is on), so a + `PackageReference` in a csproj carries no `Version`. AngleSharp and Jint are deliberately + stated as ranges: `dotnet pack` publishes them verbatim as the package's dependency ranges. +- The package version is parsed from the top entry of `CHANGELOG.md` (`ReleaseNotesParser`) + and passed to the build as `-p:Version`. Release-worthy changes get a `CHANGELOG.md` line. + `AssemblyVersion` is pinned to `1.0.0.0` so the strong-name identity survives that. - `RunUnitTests` runs the suite twice, differing only in a `prefetched` environment variable that nothing in this repo currently reads — a single run is equivalent locally. -- There is no `global.json`; the bootstrap scripts use the STS channel, CI installs 10.0.x. +- `global.json` pins the SDK to the 10.0 feature band (`rollForward: latestFeature`); the NUKE + build project targets `net10.0`, so an older SDK cannot bootstrap it anyway. ## Architecture @@ -154,8 +159,8 @@ Concrete .NET techniques that apply here: caches, and `Engine.PrepareScript` moves parsing and static analysis off the run path. Constraint worth knowing before reaching for a newer BCL API: the library targets -`netstandard2.0`, `net462`, `net472` and `net8.0`, and takes no dependency beyond AngleSharp -and Jint. `Span`, `MemoryExtensions`, `ArrayPool` and friends are therefore **not** +`netstandard2.0`, `net462`, `net472`, `net8.0` and `net10.0`, and takes no dependency beyond +AngleSharp and Jint. `Span`, `MemoryExtensions`, `ArrayPool` and friends are therefore **not** available unconditionally — they would need a `System.Memory` package reference or a `#if NET8_0_OR_GREATER` guard, so weigh that against the actual gain. `LangVersion` is `latest`, so modern C# *syntax* is always fine. diff --git a/global.json b/global.json new file mode 100644 index 0000000..512142d --- /dev/null +++ b/global.json @@ -0,0 +1,6 @@ +{ + "sdk": { + "version": "10.0.100", + "rollForward": "latestFeature" + } +} diff --git a/nuke/Build.cs b/nuke/Build.cs index 45b59dd..5072f38 100644 --- a/nuke/Build.cs +++ b/nuke/Build.cs @@ -5,7 +5,6 @@ using Nuke.Common.ProjectModel; using Nuke.Common.Tools.DotNet; using Nuke.Common.Tools.GitHub; -using Nuke.Common.Tools.NuGet; using Nuke.Common.Utilities.Collections; using Octokit; using Octokit.Internal; @@ -15,7 +14,6 @@ using System.IO; using System.Linq; using static Nuke.Common.Tools.DotNet.DotNetTasks; -using static Nuke.Common.Tools.NuGet.NuGetTasks; using Project = Nuke.Common.ProjectModel.Project; class Build : NukeBuild @@ -46,8 +44,6 @@ class Build : NukeBuild AbsolutePath SourceDirectory => RootDirectory / "src"; - AbsolutePath BuildDirectory => SourceDirectory / TargetProjectName / "bin" / Configuration; - AbsolutePath ResultDirectory => RootDirectory / "bin" / Version; AbsolutePath NugetDirectory => ResultDirectory / "nuget"; @@ -141,6 +137,7 @@ protected override void OnBuildInitialized() var settings = s .SetProjectFile(Solution) .SetConfiguration(Configuration) + .SetVersion(Version) .EnableNoRestore(); if (!String.IsNullOrEmpty(AngleSharpVersion)) @@ -161,6 +158,7 @@ protected override void OnBuildInitialized() var settings = s .SetProjectFile(Solution) .SetConfiguration(Configuration) + .SetProperty("Version", Version) .EnableNoRestore() .EnableNoBuild(); @@ -173,39 +171,29 @@ protected override void OnBuildInitialized() }); }); - Target CopyFiles => _ => _ + // The package is produced by `dotnet pack` straight from the project, so the dependency + // groups follow the actual TargetFrameworks instead of a hand-maintained nuspec. + Target CreatePackage => _ => _ .DependsOn(Compile) .Executes(() => { - foreach (var item in TargetFrameworks) + DotNetPack(s => { - var targetDir = NugetDirectory / "lib" / item; - var srcDir = BuildDirectory / item; - - (srcDir / $"{TargetProjectName}.dll").Copy(targetDir / $"{TargetProjectName}.dll", ExistsPolicy.FileOverwriteIfNewer); - (srcDir / $"{TargetProjectName}.pdb").Copy(targetDir / $"{TargetProjectName}.pdb", ExistsPolicy.FileOverwriteIfNewer); - (srcDir / $"{TargetProjectName}.xml").Copy(targetDir / $"{TargetProjectName}.xml", ExistsPolicy.FileOverwriteIfNewer); - } + var settings = s + .SetProject(TargetProject) + .SetConfiguration(Configuration) + .SetVersion(Version) + .SetOutputDirectory(NugetDirectory) + .EnableNoRestore() + .EnableNoBuild(); - (SourceDirectory / $"{TargetProjectName}.nuspec").Copy(NugetDirectory / $"{TargetProjectName}.nuspec", ExistsPolicy.FileOverwriteIfNewer); - (RootDirectory / "logo.png").Copy(NugetDirectory / "logo.png", ExistsPolicy.FileOverwriteIfNewer); - (RootDirectory / "README.md").Copy(NugetDirectory / "README.md", ExistsPolicy.FileOverwriteIfNewer); - }); + if (!String.IsNullOrEmpty(AngleSharpVersion)) + { + settings = settings.SetProperty("AngleSharpVersion", AngleSharpVersion); + } - Target CreatePackage => _ => _ - .DependsOn(CopyFiles) - .Executes(() => - { - var nuspec = NugetDirectory / $"{TargetProjectName}.nuspec"; - - NuGetPack(_ => _ - .SetTargetPath(nuspec) - .SetVersion(Version) - .SetOutputDirectory(NugetDirectory) - .SetSymbols(true) - .SetSymbolPackageFormat("snupkg") - .AddProperty("Configuration", Configuration) - ); + return settings; + }); }); Target PublishPackage => _ => _ @@ -221,9 +209,10 @@ protected override void OnBuildInitialized() throw new BuildAbortedException("Could not resolve the NuGet API key."); } + // Pushing the .nupkg also uploads the matching .snupkg next to it. foreach (var nupkg in NugetDirectory.GlobFiles("*.nupkg")) { - NuGetPush(s => s + DotNetNuGetPush(s => s .SetTargetPath(nupkg) .SetSource("https://api.nuget.org/v3/index.json") .SetApiKey(apiKey)); diff --git a/nuke/_build.csproj b/nuke/_build.csproj index 5a0000d..0c61074 100644 --- a/nuke/_build.csproj +++ b/nuke/_build.csproj @@ -11,13 +11,10 @@ - + + - - - - diff --git a/src/AngleSharp.Js.Tests/AngleSharp.Js.Tests.csproj b/src/AngleSharp.Js.Tests/AngleSharp.Js.Tests.csproj index dcf1f90..3081f6f 100644 --- a/src/AngleSharp.Js.Tests/AngleSharp.Js.Tests.csproj +++ b/src/AngleSharp.Js.Tests/AngleSharp.Js.Tests.csproj @@ -1,15 +1,13 @@ - net8.0 + net10.0 $(TargetFrameworks);net462;net472 false true - - netstandard2.0 - + @@ -17,16 +15,16 @@ - - + + + + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - diff --git a/src/AngleSharp.Js.Tests/Properties/AssemblyInfo.cs b/src/AngleSharp.Js.Tests/Properties/AssemblyInfo.cs deleted file mode 100644 index adac18c..0000000 --- a/src/AngleSharp.Js.Tests/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,7 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; - -[assembly: AssemblyCopyright("Copyright © AngleSharp, 2013-2019.")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] -[assembly: ComVisible(false)] \ No newline at end of file diff --git a/src/AngleSharp.Js.nuspec b/src/AngleSharp.Js.nuspec deleted file mode 100644 index 180ae03..0000000 --- a/src/AngleSharp.Js.nuspec +++ /dev/null @@ -1,45 +0,0 @@ - - - - AngleSharp.Js - $version$ - AngleSharp - Florian Rappl - MIT - - https://anglesharp.github.io - logo.png - README.md - false - Integrates a JavaScript engine to AngleSharp. - https://github.com/AngleSharp/AngleSharp.Js/blob/master/CHANGELOG.md - Copyright 2017-2026, AngleSharp - html html5 css css3 dom javascript scripting library js scripts runtime jint anglesharp angle - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/AngleSharp.Js.sln b/src/AngleSharp.Js.sln deleted file mode 100644 index 4ef0c1c..0000000 --- a/src/AngleSharp.Js.sln +++ /dev/null @@ -1,46 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25123.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AngleSharp.Js", "AngleSharp.Js\AngleSharp.Js.csproj", "{4ED5A0B3-AE7A-40B6-BBAC-FF408D6C6BC3}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AngleSharp.Js.Tests", "AngleSharp.Js.Tests\AngleSharp.Js.Tests.csproj", "{18B0B97B-8795-4DC2-A1E7-8070255BE718}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "_build", "..\nuke\_build.csproj", "{07DA52AA-8F6F-4F43-B09E-6AE899E95E43}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {4ED5A0B3-AE7A-40B6-BBAC-FF408D6C6BC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4ED5A0B3-AE7A-40B6-BBAC-FF408D6C6BC3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4ED5A0B3-AE7A-40B6-BBAC-FF408D6C6BC3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4ED5A0B3-AE7A-40B6-BBAC-FF408D6C6BC3}.Release|Any CPU.Build.0 = Release|Any CPU - {73856B9E-967D-44AA-A644-91CBBE75BF9D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {73856B9E-967D-44AA-A644-91CBBE75BF9D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {73856B9E-967D-44AA-A644-91CBBE75BF9D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {73856B9E-967D-44AA-A644-91CBBE75BF9D}.Release|Any CPU.Build.0 = Release|Any CPU - {9136D59F-9F50-4E02-96B2-3EAC114B95FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9136D59F-9F50-4E02-96B2-3EAC114B95FA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9136D59F-9F50-4E02-96B2-3EAC114B95FA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9136D59F-9F50-4E02-96B2-3EAC114B95FA}.Release|Any CPU.Build.0 = Release|Any CPU - {18B0B97B-8795-4DC2-A1E7-8070255BE718}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {18B0B97B-8795-4DC2-A1E7-8070255BE718}.Debug|Any CPU.Build.0 = Debug|Any CPU - {18B0B97B-8795-4DC2-A1E7-8070255BE718}.Release|Any CPU.ActiveCfg = Release|Any CPU - {18B0B97B-8795-4DC2-A1E7-8070255BE718}.Release|Any CPU.Build.0 = Release|Any CPU - {2BEBF4AD-1660-43A6-B452-109716F42FA6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2BEBF4AD-1660-43A6-B452-109716F42FA6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2BEBF4AD-1660-43A6-B452-109716F42FA6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2BEBF4AD-1660-43A6-B452-109716F42FA6}.Release|Any CPU.Build.0 = Release|Any CPU - {14AC7A32-E4E4-4ADF-A81A-030FC90E1BB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {14AC7A32-E4E4-4ADF-A81A-030FC90E1BB6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {14AC7A32-E4E4-4ADF-A81A-030FC90E1BB6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {14AC7A32-E4E4-4ADF-A81A-030FC90E1BB6}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/src/AngleSharp.Js.slnx b/src/AngleSharp.Js.slnx new file mode 100644 index 0000000..7b1c765 --- /dev/null +++ b/src/AngleSharp.Js.slnx @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/src/AngleSharp.Js/AngleSharp.Js.csproj b/src/AngleSharp.Js/AngleSharp.Js.csproj index b5d6194..305b981 100644 --- a/src/AngleSharp.Js/AngleSharp.Js.csproj +++ b/src/AngleSharp.Js/AngleSharp.Js.csproj @@ -3,26 +3,37 @@ netstandard2.0;net8.0;net10.0 $(TargetFrameworks);net462;net472 true + + + + https://anglesharp.github.io + MIT + logo.png + README.md + html;html5;css;css3;dom;javascript;scripting;library;js;scripts;runtime;jint;anglesharp;angle + https://github.com/AngleSharp/AngleSharp.Js/blob/master/CHANGELOG.md https://github.com/AngleSharp/AngleSharp.Js git true true true snupkg - MIT - 1.* - + + - - + + - - false - - \ No newline at end of file + + + + <_Parameter1>false + + + diff --git a/src/AngleSharp.Js/Properties/AssemblyInfo.cs b/src/AngleSharp.Js/Properties/AssemblyInfo.cs deleted file mode 100644 index 68c4f10..0000000 --- a/src/AngleSharp.Js/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,7 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -[assembly: AssemblyCopyright("Copyright © AngleSharp, 2013-2019")] -[assembly: ComVisible(false)] -[assembly: InternalsVisibleToAttribute("AngleSharp.Js.Tests, PublicKey=002400000480000094000000060200000024000052534131000400000100010001adf274fa2b375134e8e4558d606f1a0f96f5cd0c6b99970f7cce9887477209d7c29f814e2508d8bd2526e99e8cd273bd1158a3984f1ea74830ec5329a77c6ff201a15edeb8b36ab046abd1bce211fe8dbb076d7d806f46b15bfda44def04ead0669971e96c5f666c9eda677f28824fff7aa90d32929ed91d529a7a41699893")] diff --git a/src/Directory.Build.props b/src/Directory.Build.props index f727b1f..0dc0cbc 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,11 +1,37 @@ - - Integrates a JavaScript engine to AngleSharp. + AngleSharp.Js - 1.0.0 + Integrates a JavaScript engine to AngleSharp. + AngleSharp + Copyright 2017-2026, AngleSharp + + + + + 1.0.0.0 + + + latest - true true - $(MSBuildThisFileDirectory)\Key.snk + true + $(MSBuildThisFileDirectory)Key.snk + + + + + 1.5.0 + + + + + true - \ No newline at end of file + diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props new file mode 100644 index 0000000..0d54606 --- /dev/null +++ b/src/Directory.Packages.props @@ -0,0 +1,23 @@ + + + true + + + + + + + + + + + + + + + + + + + From ce2bb372c63bf0dff39f371cb80d85b448928ea6 Mon Sep 17 00:00:00 2001 From: Marko Lahma Date: Thu, 30 Jul 2026 11:45:09 +0300 Subject: [PATCH 2/4] Keep the .sln format, drop only the orphaned config blocks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reverts the .slnx conversion per review: the format change is not worth narrowing the tooling contributors can use, and the benefit was small. Keeps the part that was actually broken — four ProjectConfiguration blocks referencing project GUIDs that no longer exist in the solution. Co-Authored-By: Claude Opus 5 (1M context) --- .nuke/parameters.json | 2 +- AGENTS.md | 2 +- src/AngleSharp.Js.sln | 30 ++++++++++++++++++++++++++++++ src/AngleSharp.Js.slnx | 9 --------- 4 files changed, 32 insertions(+), 11 deletions(-) create mode 100644 src/AngleSharp.Js.sln delete mode 100644 src/AngleSharp.Js.slnx diff --git a/.nuke/parameters.json b/.nuke/parameters.json index 08b0fe3..4dcccaa 100644 --- a/.nuke/parameters.json +++ b/.nuke/parameters.json @@ -1,4 +1,4 @@ { "$schema": "./build.schema.json", - "Solution": "src/AngleSharp.Js.slnx" + "Solution": "src/AngleSharp.Js.sln" } \ No newline at end of file diff --git a/AGENTS.md b/AGENTS.md index 6d49f14..42d0ef4 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -22,7 +22,7 @@ The orchestrator is NUKE (`nuke/Build.cs`), bootstrapped by `build.ps1` / `build For the normal edit/test loop use the SDK directly — much faster than the NUKE bootstrap: ```powershell -dotnet build src/AngleSharp.Js.slnx +dotnet build src/AngleSharp.Js.sln dotnet test src/AngleSharp.Js.Tests/AngleSharp.Js.Tests.csproj -f net10.0 dotnet test src/AngleSharp.Js.Tests/AngleSharp.Js.Tests.csproj -f net10.0 --filter "FullyQualifiedName~InstanceOfTests" dotnet test src/AngleSharp.Js.Tests/AngleSharp.Js.Tests.csproj -f net10.0 --filter "Name=WindowIsAnInstanceOfWindow" diff --git a/src/AngleSharp.Js.sln b/src/AngleSharp.Js.sln new file mode 100644 index 0000000..d404747 --- /dev/null +++ b/src/AngleSharp.Js.sln @@ -0,0 +1,30 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25123.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AngleSharp.Js", "AngleSharp.Js\AngleSharp.Js.csproj", "{4ED5A0B3-AE7A-40B6-BBAC-FF408D6C6BC3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AngleSharp.Js.Tests", "AngleSharp.Js.Tests\AngleSharp.Js.Tests.csproj", "{18B0B97B-8795-4DC2-A1E7-8070255BE718}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "_build", "..\nuke\_build.csproj", "{07DA52AA-8F6F-4F43-B09E-6AE899E95E43}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4ED5A0B3-AE7A-40B6-BBAC-FF408D6C6BC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4ED5A0B3-AE7A-40B6-BBAC-FF408D6C6BC3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4ED5A0B3-AE7A-40B6-BBAC-FF408D6C6BC3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4ED5A0B3-AE7A-40B6-BBAC-FF408D6C6BC3}.Release|Any CPU.Build.0 = Release|Any CPU + {18B0B97B-8795-4DC2-A1E7-8070255BE718}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {18B0B97B-8795-4DC2-A1E7-8070255BE718}.Debug|Any CPU.Build.0 = Debug|Any CPU + {18B0B97B-8795-4DC2-A1E7-8070255BE718}.Release|Any CPU.ActiveCfg = Release|Any CPU + {18B0B97B-8795-4DC2-A1E7-8070255BE718}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/AngleSharp.Js.slnx b/src/AngleSharp.Js.slnx deleted file mode 100644 index 7b1c765..0000000 --- a/src/AngleSharp.Js.slnx +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - From c9db87eaf97e24688ee30d09e3ed74bc0045353c Mon Sep 17 00:00:00 2001 From: Marko Lahma Date: Thu, 30 Jul 2026 11:47:33 +0300 Subject: [PATCH 3/4] =?UTF-8?q?Drop=20global.json=20=E2=80=94=20the=20SDK?= =?UTF-8?q?=20version=20is=20deliberately=20unrestricted?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removes the global.json added earlier in this branch, per review: the absence is intentional, not an oversight, and AGENTS.md now says so rather than describing it as a gap. Co-Authored-By: Claude Opus 5 (1M context) --- AGENTS.md | 4 ++-- global.json | 6 ------ 2 files changed, 2 insertions(+), 8 deletions(-) delete mode 100644 global.json diff --git a/AGENTS.md b/AGENTS.md index 42d0ef4..4b369dd 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -40,8 +40,8 @@ dotnet test src/AngleSharp.Js.Tests/AngleSharp.Js.Tests.csproj -f net10.0 --filt `AssemblyVersion` is pinned to `1.0.0.0` so the strong-name identity survives that. - `RunUnitTests` runs the suite twice, differing only in a `prefetched` environment variable that nothing in this repo currently reads — a single run is equivalent locally. -- `global.json` pins the SDK to the 10.0 feature band (`rollForward: latestFeature`); the NUKE - build project targets `net10.0`, so an older SDK cannot bootstrap it anyway. +- There is deliberately no `global.json` — the repository does not restrict the SDK version. The + bootstrap scripts use the STS channel, CI installs 10.0.x. ## Architecture diff --git a/global.json b/global.json deleted file mode 100644 index 512142d..0000000 --- a/global.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "sdk": { - "version": "10.0.100", - "rollForward": "latestFeature" - } -} From f6fbd93672607a36a083c5c76bfcbf0027469e27 Mon Sep 17 00:00:00 2001 From: Marko Lahma Date: Thu, 30 Jul 2026 12:17:27 +0300 Subject: [PATCH 4/4] Align versioning and determinism with the core AngleSharp repository Two things the core repo already does better, found while porting this change to AngleSharp/AngleSharp#1272. Drops the AssemblyVersion pin. Published AngleSharp bumps AssemblyVersion with every minor (1.5.0.0, 1.6.0.0, 1.7.0.0), so freezing it here would have made the two packages follow opposite policies. Restores as the fallback for builds that bypass the NUKE script, matching the core layout. The built assembly is unchanged either way at 1.0.0.0. Replaces the GITHUB_ACTIONS environment gate for ContinuousIntegrationBuild with .SetContinuousIntegrationBuild(IsServerBuild) on Compile and pack, which is what nuke/Build.cs in the core repo does. NUKE's host detection is not tied to one CI provider, and the core repo's published symbols prove the mechanism works: AngleSharp 1.6.0 has zero absolute paths. Verified: package metadata and dependency ranges are byte-identical to the previous state of this branch apart from the SourceLink commit hash. Co-Authored-By: Claude Opus 5 (1M context) --- nuke/Build.cs | 2 ++ src/Directory.Build.props | 14 ++++---------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/nuke/Build.cs b/nuke/Build.cs index 5072f38..f1dc816 100644 --- a/nuke/Build.cs +++ b/nuke/Build.cs @@ -138,6 +138,7 @@ protected override void OnBuildInitialized() .SetProjectFile(Solution) .SetConfiguration(Configuration) .SetVersion(Version) + .SetContinuousIntegrationBuild(IsServerBuild) .EnableNoRestore(); if (!String.IsNullOrEmpty(AngleSharpVersion)) @@ -184,6 +185,7 @@ protected override void OnBuildInitialized() .SetConfiguration(Configuration) .SetVersion(Version) .SetOutputDirectory(NugetDirectory) + .SetContinuousIntegrationBuild(IsServerBuild) .EnableNoRestore() .EnableNoBuild(); diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 0dc0cbc..af56551 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -6,12 +6,11 @@ Copyright 2017-2026, AngleSharp - + - 1.0.0.0 + 1.0.0 @@ -29,9 +28,4 @@ 1.5.0 - - - - true -