Skip to content

Qt Bridge for C# - Visual Studio Code extension. - #535

Draft
kaheimri wants to merge 14 commits into
qt-labs:devfrom
kaheimri:feature/qt-bridge-csharp
Draft

Qt Bridge for C# - Visual Studio Code extension.#535
kaheimri wants to merge 14 commits into
qt-labs:devfrom
kaheimri:feature/qt-bridge-csharp

Conversation

@kaheimri

Copy link
Copy Markdown

Summary

Adds the initial implementation of the Qt Bridge for C# - Visual Studio Code extension.

Features

  • Project creation from the extension Welcome page
  • Build, run and debug support through C# Dev Kit
  • QML language server integration
  • QML syntax highlighting and code completion
  • Live preview of the currently active QML file

Supported platforms, tested on:

  • Windows
  • Linux
  • macOS

Notes

This implementation requires the changes planned for Bridge 0.4.0-beta and is not compatible with the current 0.3.0-beta NuGet package.

kaheimri added 14 commits July 28, 2026 12:02
Introduce a dedicated, initially behavior-free extension package for
Qt Bridge C# project integration. Add the standard build, lint,
packaging, licensing, and extension-host test infrastructure, and
register the extension with the repository scripts, CI workflows, and
Qt extension pack.

Change-Id: Ie916bb32a9d10c00fa110c7ca36c366e62f6597b
Define the public project, metadata, build, and preview interfaces in
qt-lib. Export an initially empty API implementation from the Qt Bridge
C# extension to establish the integration boundary before implementing
project discovery.

Add coverage for extension activation, API retrieval, and empty project
lookups.

Change-Id: Iceb7d5e793396db8b4a305af8a49528d45226620
Detect Qt Bridge projects from package references, imported targets,
and MSBuild properties. Resolve configured or bundled Qt installations
and publish deterministic project snapshots through the extension API.

Track workspace and project-file changes, support multiple projects,
and associate files with their closest containing project.

Change-Id: I83e1e21f299dbca343f336713ca2454dd946d3d3
Discover build-generated metadata for each Qt Bridge project and accept
only files matching the canonical project path. Track metadata and ready
marker changes while preserving deterministic configuration selection.

Expose coherent metadata snapshots and change notifications for qmlls,
QML Preview, and source-to-project association. Add coverage for valid,
unready, mismatched, ambiguous, and partially usable metadata.

Change-Id: I97a8a4e006efb1eb6c2cc2265960ed47e24aff8f
Initial workspace folders and folders added later followed different
qmlls startup paths. Activation initialized and started all projects
in one batch, while dynamically added folders went through
QMLProjectManager.onProjectAdded().

Route both cases through QMLProjectManager.initializeProject() so
configuration loading, qmlls parameter setup, and qmlls startup
happen through one code path. Keep the activation-time release check
separate, because it is background maintenance rather than project
initialization.

Change-Id: I74e147b9eca6c8b69d5ac474b0ce9be01121267f
Resolve Qt Bridge project identity and QML import roots from the
qt-bridge-csharp extension API instead of reading generated metadata
locally, and feed qmlls with the API-provided build metadata.

Change-Id: I2021d327317cacf4ed192c47fb010e489266b8c0
Compare effective qmlls startup state when Qt Bridge project or metadata
events arrive. Restart through the operation queue when startup inputs
change, otherwise resend $/addBuildDirs so qmlls reloads updated build
metadata without restarting.

Keep workspace-folder registration limited to initial startup and add
coverage for restart, refresh, and no-op decisions.

Change-Id: Ia54732f486e4cc2095d001fef021e386166542d6
Combine ready Qt Bridge projects within each workspace folder into one
deterministic qmlls configuration. Apply their import paths, no-CMake
policy, workspace folders, and build directories without arbitrarily
selecting one project.

Use a startup build directory only when one ready project exists, route
metadata events to the affected workspace, and add multi-project
aggregation coverage.

Change-Id: If7f5874a02b3a32766c676f5317078d13e68ea90
Implement Bridge-specific application staging and runtime launch
configuration behind the cross-extension API. Return a disposable
descriptor containing the executable, working directory, runtime paths,
and environment.

Update qt-qml to consume the descriptor while retaining Preview protocol
handling and source mapping. Resolve projects from the active QML file
for multi-project workspaces, and cover staging and cleanup behavior.

Change-Id: I6e82da3dadf8b8a0e2eb305f04b5c79babec9de2
Resolve QtDir from project properties, workspace configuration, the
environment, or the Qt Core selection before using packaged Qt.

Refresh project state when the selected Qt changes and pass the resolved
QtDir to extension-initiated builds. Extend the public build options and
add coverage for resolution precedence and cross-platform paths.

Change-Id: I9ef89ba49216030d912360fbbe263d8b8851dafa
Change-Id: I4145c9c5d2c8843b2f7f59dab5ee1fe7805fcc65
Add VS Code configurations for running the Qt Bridge C# integration
and debugging its extension tests. Start the required qt-core and
qt-qml development dependencies and update the development workflow.

Change-Id: Ib731e5f5cc97bd2b6ceabad9ef61c7345c644ee8
Select Git Bash explicitly on Windows while continuing to use the
existing shell implementation on Unix. Enforce LF line endings for
shell scripts so Windows checkouts remain executable by Bash.

Change-Id: I66239f504ef5d39a052f5b40b0da9859b7733515
Change-Id: I3f977b261cbe6e933f0a9169637c08b10b1f43d0
@CLAassistant

CLAassistant commented Jul 30, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants