feat: CPS-based XSharp project system for VS2022+ - #2052
Draft
RobertvanderHulst with Copilot wants to merge 3 commits into
Draft
feat: CPS-based XSharp project system for VS2022+#2052RobertvanderHulst with Copilot wants to merge 3 commits into
RobertvanderHulst with Copilot wants to merge 3 commits into
Conversation
New src/VisualStudio/ProjectSystem/ folder with:
- XSharp.ProjectSystem2022.csproj (net472, CPS SDK refs)
- XSharpProjectCapabilities.cs — CPS capability constants
- XSharpProjectCapabilitiesProvider.cs — MEF export
- XSharpProjectType.cs — ExportProjectType binding .xsproj to CPS
- XSharpProjectTreePropertiesProvider.cs — file icons/tree flags
- XSharpProjectBuildProvider.cs — build-property integration + up-to-date check
- XSharpProjectProperties.cs — strongly-typed MSBuild property access
- XSharpTargetFrameworkProvider.cs — multi-targeting (VS2022+ only)
- XSharpCodeDomIntegration.cs — CodeDom bridge for WinForms
- PropertyPages/{General,Build,Debug}PropertyPageProvider.cs
- Rules/XSharp.xaml — MSBuild property rules for project designer
- Rules/XSharpMultiTarget.xaml — TargetFrameworks rule (multi-targeting)
- XSharpCpsPackage.cs — async VS package for VS2022+
- XSharpCpsPackage.pkgdef — registry entries activating CPS for .xsproj
- README.md
Also: add XSharp.ProjectSystem2022 to VSIntegration2022.sln
Co-authored-by: RobertvanderHulst <14240939+RobertvanderHulst@users.noreply.github.com>
- XSharpCpsPackage.IsCpsEnabled: default s_isCpsEnabled to false; only set to true after version check passes (avoids false positive when VS shell service is unavailable) - XSharpProjectProperties.GetConfigurationProperties: use ProjectPropertiesContext to read per-configuration values instead of falling back to common properties - XSharpProjectBuildProvider: remove unused stored fields for ConfiguredProject in both IBuildPropertiesProvider and IBuildUpToDateCheckProvider; add comments documenting future use Co-authored-by: RobertvanderHulst <14240939+RobertvanderHulst@users.noreply.github.com>
Copilot
AI
changed the title
feat: add CPS-based XSharp project system (VS2022+)
feat: CPS-based XSharp project system for VS2022+
Aug 13, 2026
Copilot created this pull request from a session on behalf of
RobertvanderHulst
August 13, 2026 11:43
View session
Co-authored-by: RobertvanderHulst <14240939+RobertvanderHulst@users.noreply.github.com>
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.
Adds a parallel CPS (Common Project System) implementation alongside the existing MPF-based system. VS2019 continues to use MPF unchanged; VS2022/VS2026 load CPS via
ProjectSystemPackageregistry binding.New:
src/VisualStudio/ProjectSystem/Core CPS wiring
XSharpProjectCapabilities.cs— capability constants (XSharp,Managed,MultipleTargetFrameworks, …)XSharpProjectCapabilitiesProvider.cs— MEFIProjectCapabilitiesProviderexportXSharpProjectType.cs—[ExportProjectType]binding.xsproj+ GUIDaa6c8d78-…to this systemXSharpCpsPackage.cs— async package;IsCpsEnableddefaultsfalse, settrueonly after confirming VS ≥ 17.xXSharpCpsPackage.pkgdef—ProjectSystemPackageregistry entry + VO editor factory re-registrations for VS2022+Project tree & build
XSharpProjectTreePropertiesProvider.cs— mirrorsXSharpFileNodeicon mapping (.xsfrm→FormInstance,.xsmnu→MainMenuControl,.prg/.xs→Script,.xaml→WPFFile, etc.)XSharpProjectBuildProvider.cs—IBuildPropertiesProvider+IBuildUpToDateCheckProviderstubsXSharpProjectProperties.cs— strongly-typed async wrappers for all XSharp MSBuild properties; configuration-specific reads use a properIProjectPropertiesContextMulti-targeting (VS2022+ only — not available in VS2019/MPF)
XSharpTargetFrameworkProvider.cs—IActiveConfiguredProjectsDimensionProviderdriven by<TargetFrameworks>Rules/XSharpMultiTarget.xaml—TargetFrameworks/ActiveTargetFrameworkproperty rulesProperty pages & rules
Rules/XSharp.xaml— XAML MSBuild rules for Application, Build, Build Events, Debug pagesPropertyPages/{General,Build,Debug}PropertyPageProvider.cs—IPageMetadataexports wired to existingXSharpConstantspage GUIDsCodeDom / WinForms designer
XSharpCodeDomIntegration.cs— resolvesVSXsharpCodeDomProviderfrom the ProjectPackage assembly at runtime via MEF; avoids a hard assembly referenceSolution
XSharp.ProjectSystem2022added toVSIntegration2022.sln(Vs2022 folder); excluded fromVSIntegration.sln(VS2019).