TypeScript icon indicating copy to clipboard operation
TypeScript copied to clipboard

Visual Studio TS 1.7 project has TS 1.8 compiler error

Open giancarloa opened this issue 10 years ago • 4 comments

Hello...

I am using VS 2015 Update 2. The version of TS I have installed on my machine is 1.8. However I have a project that has the TypeScriptToolsVersion set to 1.7 which presumably should force compilation using the 1.7 version of the compiler, which I have installed as well. However I am getting the error below when compiling. This error is a 1.8 error. It should not appear when compiling using 1.7, I think. Any ideas? The MS Build output shows that compilation is using 1.7 tsc.exe but then why am I getting 1.8 errors????? Thank you

TS17009 'super' must be called before accessing 'this' in the constructor of a derived class.

giancarloa avatar Jun 14 '16 17:06 giancarloa

Does the error have a "build" prefix? if not then this is generated from your language service.

VS knows only about one version of the language, your latest, in this case TS 1.8.

MSBuild allows for multiple versions of the compiler to be installed. and it will use the right one to build.

mhegazy avatar Jun 14 '16 17:06 mhegazy

@mhegazy ... wow... always there to help... thanks thanks... anyway...

not sure about the build prefix... i am seeing this error inside of VS in the error list... in the list the column "Source" shows "IntelliSense" and the column "Tool" shows "Microsoft.CodeAnalysis.TypeScript.EditorFeatures [TypeScript for Microsoft Visual Studio] Active"... not sure if this helps... which column shows the "build prefix"...

thanks

giancarloa avatar Jun 14 '16 17:06 giancarloa

this is what i meant:

image

The first error is generated when you do a build (F5/Ctrl F5). the second one is what the editor shows you as you type.

The first is coming from MSBuild, and this is why it has the "Build" prefix.

If the errors you see look like the second error, which is what i am guessing, then this the behavior i outlined earlier.

mhegazy avatar Jun 14 '16 17:06 mhegazy

i'm good now!!!!!! i understand... thanks again...

giancarloa avatar Jun 14 '16 18:06 giancarloa