TS Cannot find name 'foo.ts' in Visual Studio 2022

Viewed 13

Typescript compiler cannot 'see' files in the same directory in Visual Studio 2022. Each reference to a class in a different file gives a version of the following error:

Error TS2304 (TS) Cannot find name 'foo'.

Project properties are set as per the below:

enter image description here

I also have Microsoft.TypeScript.MSBuild nuget package installed (v4.8.3).

Not really sure where to go with this - it was working until I restarted VS for some other reason, but now on reload I get this error. If I copy all the classes into one ts script, the compiler is happy and I can run the code fine.

0 Answers
Related