Skip to content

[Bug]: XAML language server serves stale project state #350

Closed

Description

Describe the bug

The server keeps outdated project state in two cases:

  • After file-watcher events are missed (branch switch, bulk disk change), stale C#/project state is used until restart. Saving or reopening the page doesn't revalidate.
  • After adding a PackageReference without restoring, status stays Ready, no restore is offered, and diagnostics blame the namespace (WXAML0033).

To Reproduce

  1. Open a page that uses {x:Bind ViewModel.Title} and wait for Ready.
  2. Switch to a git branch where Title was renamed, outside VS Code (no watcher events).
  3. Edit, save, or close and reopen the page: no error appears.
  4. Separately: add <PackageReference Include="CommunityToolkit.WinUI.Controls.SettingsControls" .../> to the .csproj without restoring. Status stays Ready.

Expected behavior

Saving or reopening a document revalidates against disk. An unrestored package reports the restore-required state.

Notes

Bug bash IDs: C-40, C-53.

Screenshots

No response

OS Version and details

Windows 11 x64 (10.0.26200), VS Code 1.143.1, .NET SDK 10.0.403. Found in the XAML IntelliSense bug bash on 0.3.1-prerelease.456 (PR #276, f90df977).

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions