Skip to content

Modernize spatial tools builds, SQL CLR signing, and KML handling - #16

Merged
bmihic merged 1 commit into
masterfrom
users/bmihic/MultipleFixes
Nov 18, 2026
Merged

bmihic merged 1 commit into
masterfrom
users/bmihic/MultipleFixes

Conversation

@bmihic

@bmihic bmihic commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

Build and dependency modernization

  • Convert all four C# projects to Microsoft.NET.Sdk and replace legacy packages.config references and NuGet import checks with PackageReference.
  • Target net472 and net10.0 for the library, regular tests, and test helper; keep the DDD integration project on net472 and separate multi-target outputs.
  • Upgrade Microsoft.SqlServer.Types to 170.1000.7, MSTest to 4.4.0, Dapper.StrongName to 2.1.79, SMO to 181.36.0, Oracle.ManagedDataAccess to 23.26.300, and Microsoft.SqlServer.Compact to 4.0.8876.1.
  • Add Microsoft.NET.Test.Sdk 18.9.0 to test projects and build-only Framework reference assemblies for builds without an installed targeting pack.
  • Preserve assembly metadata, resource naming, and intentional source-file exclusions; remove obsolete build events that deleted NuGet assets in obj.
  • Resolve SQL Compact native binaries from the NuGet cache and copy both architectures through MSBuild rather than hardcoded solution package paths.

Configurable signing and SQL CLR deployment

  • Default to unsigned builds and centralize None, Development, and Production signing modes in Directory.Build.props and Directory.Build.targets.
  • Apply signing only to Framework targets; modern .NET builds remain unsigned.
  • Generate and reuse a local development SNK on explicit opt-in, require an existing production SNK, and allow overriding the signing directory/key path.
  • Ignore the root .signing directory and remove the committed legacy PFX.
  • Add managed MSBuild tasks for key generation, validation, and SQL script preparation without external setup tools or PowerShell build events.
  • Generate friend-assembly declarations from the selected public key and invalidate compilation when the signing identity changes.
  • Keep CLR strict security enabled during registration and optionally generate administrator-run signing-key trust scripts without executing SQL.
  • Add signing regression checks for unsigned/signed builds, concurrent key creation, key reuse, invalid or missing keys, framework gating, and mode changes.

KML parser hardening and API cleanup

  • Load caller-provided KML through XmlReader with DtdProcessing.Prohibit and null reader/document resolvers to reject DTDs and external entity resolution.
  • Add regression tests for DTD rejection and ordinary KML parsing.
  • Remove unused SaveLatLonBox/AddParameter database persistence helpers, Geography.DbId, and the library's resulting SqlClient dependency.
  • Remove KMLParser.ParseFile so file access remains the caller's responsibility. These removals intentionally change the exposed public/protected API.

Test infrastructure and integration behavior

  • Correct expected/actual argument ordering in regular MSTest assertions.
  • Generate Framework test binding redirects and repair Oracle configuration section registration and assembly-version redirects.
  • Use Microsoft.Data.SqlClient for SMO-based SQL registration tests.
  • Skip all DDD tests before database setup unless explicitly enabled through RunDDDTests and test-run settings, including Visual Studio/direct DLL runs.
  • Keep existing Oracle comparison behavior and update DDD registration tests to use SQL scripts from output\lib\net472\SQL Scripts.

Documentation and repository cleanup

  • Replace the root text README with Markdown build, signing, deployment, platform-support, and test instructions, including integration-test warnings.
  • Add API.md documenting exposed types and members and update solution links.
  • Remove obsolete tracked Visual Studio and SVN bridge artifacts.

Validation

  • Regular suite: 70 tests pass on each target, with default builds and with Development signing enabled for Framework builds.
  • Default solution test run skips all 25 DDD integration tests.
  • Signing regression checks and both trust-script generation entry points pass.
  • DDD builds and its corrected script paths resolve without database access.
  • SQL Server/Oracle execution and non-Windows builds were not exercised.

Build and dependency modernization
- Convert all four C# projects to Microsoft.NET.Sdk and replace legacy
  packages.config references and NuGet import checks with PackageReference.
- Target net472 and net10.0 for the library, regular tests, and test helper;
  keep the DDD integration project on net472 and separate multi-target outputs.
- Upgrade Microsoft.SqlServer.Types to 170.1000.7, MSTest to 4.4.0,
  Dapper.StrongName to 2.1.79, SMO to 181.36.0, Oracle.ManagedDataAccess
  to 23.26.300, and Microsoft.SqlServer.Compact to 4.0.8876.1.
- Add Microsoft.NET.Test.Sdk 18.9.0 to test projects and build-only Framework
  reference assemblies for builds without an installed targeting pack.
- Preserve assembly metadata, resource naming, and intentional source-file
  exclusions; remove obsolete build events that deleted NuGet assets in obj.
- Resolve SQL Compact native binaries from the NuGet cache and copy both
  architectures through MSBuild rather than hardcoded solution package paths.

Configurable signing and SQL CLR deployment
- Default to unsigned builds and centralize None, Development, and Production
  signing modes in Directory.Build.props and Directory.Build.targets.
- Apply signing only to Framework targets; modern .NET builds remain unsigned.
- Generate and reuse a local development SNK on explicit opt-in, require an
  existing production SNK, and allow overriding the signing directory/key path.
- Ignore the root .signing directory and remove the committed legacy PFX.
- Add managed MSBuild tasks for key generation, validation, and SQL script
  preparation without external setup tools or PowerShell build events.
- Generate friend-assembly declarations from the selected public key and
  invalidate compilation when the signing identity changes.
- Keep CLR strict security enabled during registration and optionally generate
  administrator-run signing-key trust scripts without executing SQL.
- Add signing regression checks for unsigned/signed builds, concurrent key
  creation, key reuse, invalid or missing keys, framework gating, and mode changes.

KML parser hardening and API cleanup
- Load caller-provided KML through XmlReader with DtdProcessing.Prohibit and
  null reader/document resolvers to reject DTDs and external entity resolution.
- Add regression tests for DTD rejection and ordinary KML parsing.
- Remove unused SaveLatLonBox/AddParameter database persistence helpers,
  Geography.DbId, and the library's resulting SqlClient dependency.
- Remove KMLParser.ParseFile so file access remains the caller's responsibility.
  These removals intentionally change the exposed public/protected API.

Test infrastructure and integration behavior
- Correct expected/actual argument ordering in regular MSTest assertions.
- Generate Framework test binding redirects and repair Oracle configuration
  section registration and assembly-version redirects.
- Use Microsoft.Data.SqlClient for SMO-based SQL registration tests.
- Skip all DDD tests before database setup unless explicitly enabled through
  RunDDDTests and test-run settings, including Visual Studio/direct DLL runs.
- Keep existing Oracle comparison behavior and update DDD registration tests
  to use SQL scripts from output\lib\net472\SQL Scripts.

Documentation and repository cleanup
- Replace the root text README with Markdown build, signing, deployment,
  platform-support, and test instructions, including integration-test warnings.
- Add API.md documenting exposed types and members and update solution links.
- Remove obsolete tracked Visual Studio and SVN bridge artifacts.

Validation
- Regular suite: 70 tests pass on each target, with default builds and with
  Development signing enabled for Framework builds.
- Default solution test run skips all 25 DDD integration tests.
- Signing regression checks and both trust-script generation entry points pass.
- DDD builds and its corrected script paths resolve without database access.
- SQL Server/Oracle execution and non-Windows builds were not exercised.
@bmihic
bmihic merged commit 2f91340 into master Nov 18, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant