2

I'm currently having two projects with typescript 1.1 that are opened in visual studio 2013 with typescript 1.8 installed. VS asks to upgrade which I did but now I get the following error: Unknown compiler option 'listemittedfiles'. Anyone has had the same?

woutervs
  • 1,500
  • 12
  • 28

2 Answers2

2

It seems inside the project we had this line hardcoded

<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets" />

That way even though it was upgraded to 1.8 it still tried to use w/e was installed in that folder. (This is a very old project that needs maintenance...)

Next to that I've removed the hardcoded path in the Path system environment variables so that tsc.exe now points to the NPM version.

woutervs
  • 1,500
  • 12
  • 28
2

If the above answer doesn't work for you, I suggest to take a look to this other answer which addressed that same issue on Visual Studio 2015 Update 3 and above:

(to summarize it, installing TypeScript 2.0 from this official link might fix the messed-up MSBuild cfg and solve the issue).

Community
  • 1
  • 1
Darkseal
  • 9,205
  • 8
  • 78
  • 111
  • Installing this Typescript 2.0 download for VS 2015 actually fixed my VS 2013 issue with `listEmittedFiles`. Also make sure to remove `` from your .csproj entirely and VS2013 should begin to use Typescript 2.0 compiler which supports `listEmittedFiles` – FirstVertex Dec 02 '16 at 15:26