How do I enable the TypeScript tab of a Visual Studio project that's a console or windows service that's self-hosting web-pages

烈酒焚心 提交于 2019-12-22 10:34:41

问题


Using Visual Studio 2015 I created a console application to self-host Owin with embedded static files. Since Visual Studio doesn't know it's a web-site project, it ignores TypeScript files. When I go to the project properties, the TypeScript tab's typically there in web projects is missing.

How do I enabled the TypeScript tab so that I can configure TypeScript and use Visual Studio 2015's built-in capabilities to compile TypeScript.


回答1:


Open the .csproj file in a text editor and add the following line

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

I added it after this command:

<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />


来源:https://stackoverflow.com/questions/33374040/how-do-i-enable-the-typescript-tab-of-a-visual-studio-project-thats-a-console-o

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