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?

5
  • This might resolve your issue: github.com/aspnet/Tooling/issues/651 Commented Aug 12, 2016 at 8:57
  • Already found and checked, doesn't seem to be the issue on my end. Commented Aug 12, 2016 at 8:58
  • 1
    From the command line do: tsc --version. What version does this return? Commented Aug 12, 2016 at 9:15
  • Returns version 1.0.3.0 :( Commented Aug 12, 2016 at 11:49
  • Also fixed my path now so it points to typescript from npm. However my answer also fixed the issue. Commented Aug 12, 2016 at 11:55

2 Answers 2

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.

Sign up to request clarification or add additional context in comments.

Comments

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).

1 Comment

Installing this Typescript 2.0 download for VS 2015 actually fixed my VS 2013 issue with listEmittedFiles. Also make sure to remove <TypeScriptToolsVersion/> from your .csproj entirely and VS2013 should begin to use Typescript 2.0 compiler which supports listEmittedFiles

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.