Danielaolive/fix sharedmappers packaging bug#10
Merged
DanielaOlive merged 17 commits intoJul 21, 2026
Conversation
…es internal Fixes CS0433 compiler errors when consumers reference multiple SDM NuGet packages simultaneously. Root causes fixed: 1. DomIds.cs compiled into every package that imported SharedMappers.projitems 2. SharedValidation types compiled into both InfraOpsProperties.Common and FacilityManagement.Common as public types Changes: - Split SharedMappers/DomIds.cs (5151 lines) into 4 per-module files: InfraopsPropertiesDomIds.cs, SlcAsset_ManagementDomIds.cs, SlcFacility_ManagementDomIds.cs, SlcPlan_And_BuildDomIds.cs - Created 5 new .projitems files (one per module DomIds + SharedFacilityMappers) - Each of the 4 Common projects now imports only its own module's DomIds projitems - SDM.AssetManagement.Common and SDM.PlanAndBuild.Common now import SharedValidation.projitems directly (previously relied on transitive access to public types through project-reference chain) - Made all SharedValidation types internal (21 types across 21 files) except ChangeTrackingBase (public base class - CS0060) and ValidationResult (public return type of validators) - ChangeTrackingBase.FieldHandler changed from protected to private protected to satisfy CS0053 with internal ChangeTrackingFieldHandler return type Fixes #9 (partial) - remaining public type CS0433 tracked in GitHub issue #9 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
SharedValidation types are now internal. Test projects need access to internal extension methods (e.g. SdmFilterExtensions.Equal with nullable enum support) that would otherwise fall back to the SDK's ExposerExtensions which has stricter IEquatable constraints. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
SdmFilterExtensions, BulkRepositoryQueryExtensions and SDMObjectReferenceExtensions are now public so consumers can use them directly. InternalsVisibleTo no longer needed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…tream projects AssetManagement.Common and PlanAndBuild.Common reference FacilityManagement.Common (which compiles the public extension classes). Importing the full SharedValidation.projitems in those projects caused CS0121 ambiguity for SdmFilterExtensions, SDMObjectReferenceExtensions and BulkRepositoryQueryExtensions. New SharedValidationNoExtensions.projitems excludes those 3 files. Downstream projects import that variant instead and consume the extension classes via the project-reference chain. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…zation public Consumers need these types directly. CS0433 risk for projects referencing multiple SDM packages is accepted; those consumers will use extern alias as a workaround until SDM.InfraOps.Core (issue #9) provides a single shared assembly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…dation in downstream projects Compiling SharedValidationNoExtensions.projitems into AssetManagement.Common and PlanAndBuild.Common caused CS0433 for ValidationException (and other types) when consumers referenced both AssetManagement.Common and FacilityManagement.Common. Fix: FacilityManagement.Common grants internal type access to AssetManagement.Common and PlanAndBuild.Common via InternalsVisibleTo. Those projects no longer import any SharedValidation projitems — they consume all SharedValidation types (internal and public) exclusively through the FacilityManagement.Common reference. SharedValidationNoExtensions.projitems deleted (no longer needed). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
… public types Adds a new test project that references all 4 Common assemblies and uses reflection to assert no public type exists in more than one assembly. Currently FAILS with 9 duplicate types (ValidationException, ValidationResult, ChangeTrackingBase, InfraOpsSerialization, SdmFilterExtensions, etc.) — this is the acceptance criterion for SDM.InfraOps.Core (issue #9). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… packages Implements GitHub issue #9. Moves all SharedValidation source into a new dedicated assembly (Skyline.DataMiner.SDM.InfraOps.Core) so each shared public type lives in exactly one compiled assembly. Changes: - New project SDM.InfraOps.Core (v1.0.0) with all 25 SharedValidation .cs files Public types: ChangeTrackingBase, ValidationResult, ValidationException, InfraOpsException, InfraOpsSerialization, SdmFilterExtensions, SDMObjectReferenceExtensions, BulkRepositoryQueryExtensions Internal types: Validator, ValidatorContext, ChangeTrackingField hierarchy, converters, middleware — exposed via InternalsVisibleTo to all 4 domain packages - All 4 Common csproj: removed SharedValidation.projitems import, added ProjectReference to SDM.InfraOps.Core - Deleted FacilityManagement.Common/Properties/InternalsVisibleTo.cs (superseded) - SDM.InfraOps.PackagingTests: NuGetPackagingTests now passes (both tests green) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sources have been moved to SDM.InfraOps.Core. No project imports SharedValidation.projitems anymore. Deleting avoids confusion and prevents accidental re-use of the old source-sharing approach. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Deleted SharedMappers.projitems (original pre-split combined file, no longer imported) - Updated SharedMappers.shproj to import the 4 active per-module projitems directly (previously imported the deleted SharedMappers.projitems which also referenced the non-existent SharedFacilityMappers.projitems, causing VS broken-reference icon) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
VS shared projects require the imported .projitems to have a SharedGUID matching the .shproj ProjectGuid (4a22402e...). Recreate SharedMappers.projitems as a browsing-only index of all DomIds + Facility mapper files. Revert shproj to import just that one file — fixes 'SharedMappers (unloaded)'. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
SharedMappers.shproj and SharedMappers.projitems served as a VS browsing convenience for the old combined DomIds file. Now that DomIds are split per-module, each file is already visible under its own Common project. The shared project added more confusion than value. The 4 active .projitems files (SharedAssetDomIds, SharedFacilityDomIds, SharedInfraopsDomIds, SharedPlanAndBuildDomIds) remain on disk and are still imported by their respective csproj files for compilation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This reverts commit dddeccc.
Eliminates the SharedMappers\ source-sharing folder entirely. Each file now lives inside its own project directory and is visible in VS naturally without needing a shared project or .projitems files. - InfraopsPropertiesDomIds.cs -> SDM.InfraOpsProperties.Common\ - SlcAsset_ManagementDomIds.cs -> SDM.AssetManagement.Common\ - SlcFacility_ManagementDomIds.cs -> SDM.FacilityManagement.Common\ - SlcPlan_And_BuildDomIds.cs -> SDM.PlanAndBuild.Common\ - Facility Management\Mappers\*.g.cs (9 files) -> SDM.FacilityManagement.Common\Mappers\ - Removed SharedMappers\ folder and all 4 .projitems files - Removed <Import> projitems lines from all 4 domain csproj files Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
rafaelabranchesskyline
approved these changes
Jul 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix double referencing of shared objects