Skip to content

error in typescript file does not show in error list if the typescript file is not open in the editor. #82208

@plaz57

Description

@plaz57

Version Used:
vs 2026 18.2.1

Steps to Reproduce:

  1. Have a syntax error in a .ts file
  2. do not have the ts file open in the editor. if the file happens to be open it works correctly.
  3. have no other compile errors in the project

A minimal repro, with source-code provided, is ideal. Most compiler/language issues can be distilled into a snippet that can be pasted into .NET Lab.

Diagnostic Id:

If this is a report about a bug in an analyzer, please include the diagnostic ID and message if possible (e.g. "IDE0030: Use coalesce expression").

in this screen shot, I also have a c# compile error, so the typescript error (TS2304) is showing up:

Image

but if I fix the c# error, the TS2304 error goes away.

Image

if I then look in the build output log, I still see the error in the ts file:

5>CompileTypeScriptWithTSConfig:
5> C:\Program Files\Microsoft Visual Studio\18\Professional\MSBuild\Microsoft\VisualStudio\NodeJs\node.exe C:\Users\plazm.nuget\packages\microsoft.typescript.msbuild\4.5.3\tools\tsc\tsc.js --project "C:\DevOps\leadfirstdev\Allegro\Main\FrameworkAllegro\SixDisciplines.FrameworkAllegro.UI\tsconfig.json" --listEmittedFiles --locale en-US
5>C:\DevOps\leadfirstdev\Allegro\Main\FrameworkAllegro\SixDisciplines.FrameworkAllegro.UI\Scripts\ShellController\CodeEdit.ts(72,37): error TS2304: Build:Cannot find name 'asdfasdasdfasdf'.

Expected Behavior:

The error list should contain all the errors, whether or not the .ts file is open or not. This makes the error list untrustworty and hard to use.

Actual Behavior:
The error list is missing the error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions