From 0512bd10df2eec092887ea57cb4d5af047a41e62 Mon Sep 17 00:00:00 2001 From: Andre Lafleur Date: Fri, 15 May 2026 15:23:51 +0800 Subject: [PATCH 1/3] fix: silence MSB3277 noise and add binding redirects on .NET Framework MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The build log was showing ~6000 instances of MSB3277 ("Found conflicts between different versions of the same dependent assembly") across the solution. The drift is real — the Genetec SDK assemblies pull in modern transitive packages (System.DirectoryServices.Protocols, System.ServiceModel.*, Microsoft.Identity.*, etc) that don't match the versions referenced by the sample projects. Two changes in Directory.build.props: - AutoGenerateBindingRedirects + GenerateBindingRedirectsOutputType for net481 projects. Resolves the version drift at runtime so .NET Framework builds load the higher version of each conflicting assembly. Fixes a latent runtime-safety issue. Auto-generated *.exe.config / *.dll.config files go to bin/ which is already gitignored. - MSBuildWarningsAsMessages MSB3277 (global). Demotes the build-time warning to a message across both target frameworks. The warning fires during MSBuild reference resolution, before runtime redirects apply, so binding redirects alone do not silence it. .NET 8 doesn't use binding redirects (different load context model) but the warning fires there too — global suppression covers both. Verified locally: warning count for MSB3277 drops from 5982 to 0. Other warning categories unchanged. --- Samples/Directory.build.props | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Samples/Directory.build.props b/Samples/Directory.build.props index 6a9325d7..b340f157 100644 --- a/Samples/Directory.build.props +++ b/Samples/Directory.build.props @@ -1,6 +1,19 @@ + + + $(MSBuildWarningsAsMessages);MSB3277 + + $(DefineConstants);NETFRAMEWORK + + true + true From 16c04e26b09e6e7b9314df3f051aa9e9d221161b Mon Sep 17 00:00:00 2001 From: Andre Lafleur Date: Fri, 15 May 2026 15:53:32 +0800 Subject: [PATCH 2/3] fix: address Copilot review on Directory.Build.props (#182) - Rename Directory.build.props -> Directory.Build.props (and .targets). MSBuild's convention-based import looks for the canonical capital-B name. Lowercase works on case-insensitive filesystems (Windows) but may not be picked up on Linux, which would silently disable both the MSB3277 demotion and the binding-redirect generation. - Remove GenerateBindingRedirectsOutputType. Binding redirects only affect entry-point app configs; for class libraries (Plugin / Workspace SDK samples) the host process's config governs assembly resolution, so the .dll.config the property would generate is ineffective. Default AutoGenerateBindingRedirects behavior already scopes correctly to Exe outputs without this flag. --- Samples/{Directory.build.props => Directory.Build.props} | 7 ++++--- .../{Directory.build.targets => Directory.Build.targets} | 0 2 files changed, 4 insertions(+), 3 deletions(-) rename Samples/{Directory.build.props => Directory.Build.props} (77%) rename Samples/{Directory.build.targets => Directory.Build.targets} (100%) diff --git a/Samples/Directory.build.props b/Samples/Directory.Build.props similarity index 77% rename from Samples/Directory.build.props rename to Samples/Directory.Build.props index b340f157..de63c00b 100644 --- a/Samples/Directory.build.props +++ b/Samples/Directory.Build.props @@ -10,10 +10,11 @@ $(DefineConstants);NETFRAMEWORK - + true - true diff --git a/Samples/Directory.build.targets b/Samples/Directory.Build.targets similarity index 100% rename from Samples/Directory.build.targets rename to Samples/Directory.Build.targets From 6e56235050eb4cf2157f2f408bee26e850748451 Mon Sep 17 00:00:00 2001 From: Andre Lafleur Date: Fri, 15 May 2026 16:44:07 +0800 Subject: [PATCH 3/3] fix: update sln Solution Items to use Directory.Build casing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to 16c04e2 — the .sln Solution Items section still pointed at the lowercase Directory.build.props / Directory.build.targets, which on case-sensitive filesystems would fail to resolve to the renamed files. --- Samples/Genetec.Dap.CodeSamples.sln | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Samples/Genetec.Dap.CodeSamples.sln b/Samples/Genetec.Dap.CodeSamples.sln index 08f64efb..69c05b63 100644 --- a/Samples/Genetec.Dap.CodeSamples.sln +++ b/Samples/Genetec.Dap.CodeSamples.sln @@ -5,8 +5,8 @@ MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{6D4CFB78-1DDF-442B-BB0F-6B119C559603}" ProjectSection(SolutionItems) = preProject .editorconfig = .editorconfig - Directory.build.props = Directory.build.props - Directory.build.targets = Directory.build.targets + Directory.Build.props = Directory.Build.props + Directory.Build.targets = Directory.Build.targets EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Media SDK", "Media SDK", "{949B9098-D0C6-4E6C-BAB4-7253789645C1}"