为什么我的VS 2013 ASP.NET项目属性中缺少“打字稿设置"选项卡? [英] Why is the Typescript settings tab missing in my VS 2013 ASP.NET project properties?

查看:81
本文介绍了为什么我的VS 2013 ASP.NET项目属性中缺少“打字稿设置"选项卡?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将一些javascript文件迁移到旧式ASP.NET MVC 5项目中的Typescript.一世 我已经创建了一个Typescript文件,并且从TS到JS的编译均按预期进行,但是在旧项目的属性中没有"Typescript Build"选项卡.

I'm trying to migrate some javascript files to Typescript in a legacy ASP.NET MVC 5 project. I I've created a Typescript file and the compilation from TS to JS works as expected, but I there is no "Typescript Build" Tab in my legacy project's properties.

在新的ASP.NET MVC 5项目上工作时,我没有出现此问题.如何在我的旧项目中解决此问题?我正在使用Visual Studio 2013 Update 1.

I did not have this problem when working on a new ASP.NET MVC 5 project. How can I fix this in my legacy project? I am using Visual Studio 2013 Update 1.

谢谢

艾德里安

推荐答案

我需要在csproj中添加以下行以导入打字稿目标:

I needed to add the following line to the csproj to import the typescript targets:

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

然后我可以在项目设置中看到打字稿构建选项.

Then I could see the typescript build options in the project settings.

这篇关于为什么我的VS 2013 ASP.NET项目属性中缺少“打字稿设置"选项卡?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆