Typescript build failure

亡梦爱人 提交于 2020-01-23 13:28:49

问题


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?


回答1:


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.




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



来源:https://stackoverflow.com/questions/38913705/typescript-build-failure

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!