From 24036ab6788aa8ec7167117bcf6e1f10ec4b54fb Mon Sep 17 00:00:00 2001 From: Stephen Lee Date: Thu, 20 Aug 2026 19:16:14 -0400 Subject: [PATCH] Add explicit Newtonsoft.Json reference to Rock.Blocks for VS 2026 builds VS 2026 (v18) MSBuild/Roslyn fails Rock.Blocks with CS0012 ('JObject is defined in an assembly that is not referenced') at every call site that binds .ToDictionary()/LINQ overloads, because Rock's JsonExtensions.ToDictionary(this JObject) extension (namespace Rock) puts JObject in the overload-candidate set and classic csproj builds never pass transitive dependencies to the compiler. VS 2022 tolerated this; VS 2026 does not. Add the reference explicitly (Newtonsoft.Json 13.0.1 is already in the solution packages folder and ships in RockWeb\Bin, so no output change). Upstream Rock resolves this from v18.1 onward by converting Rock.Blocks to an SDK-style project; this commit is the stopgap for the 1.16.x/17.x lines and should be cherry-picked onto future version branches until then. Co-Authored-By: Claude Fable 5 --- Rock.Blocks/Rock.Blocks.csproj | 3 +++ Rock.Blocks/packages.config | 1 + 2 files changed, 4 insertions(+) diff --git a/Rock.Blocks/Rock.Blocks.csproj b/Rock.Blocks/Rock.Blocks.csproj index 542422ccada..3baf72763c7 100644 --- a/Rock.Blocks/Rock.Blocks.csproj +++ b/Rock.Blocks/Rock.Blocks.csproj @@ -41,6 +41,9 @@ ..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.SqlServer.dll + + ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll + diff --git a/Rock.Blocks/packages.config b/Rock.Blocks/packages.config index 9dad9707015..dd9f6308382 100644 --- a/Rock.Blocks/packages.config +++ b/Rock.Blocks/packages.config @@ -1,5 +1,6 @@  + \ No newline at end of file