Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is the Typescript settings tab missing in my VS 2013 ASP.NET project properties?

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.

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.

Thanks,

Adrian

like image 756
Adrian Grigore Avatar asked Apr 17 '14 10:04

Adrian Grigore


People also ask

How do I get to project settings in Visual Studio?

You access project properties by right-clicking the project node in Solution Explorer and choosing Properties, or by typing properties into the search box on the menu bar and choosing Properties Window from the results. . NET projects might also have a properties node in the project tree itself.


2 Answers

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.

like image 157
Sam Holder Avatar answered Oct 08 '22 03:10

Sam Holder


As Hans Passant correctly hinted in the comments, the problem was the following ProjectGuid in my .csproj file: {349c5851-65df-11da-9384-00065b846f21}

Once I removed that GUID from my project file and reloaded my project, the Typescript tab showed up in the project properties.

like image 36
Adrian Grigore Avatar answered Oct 08 '22 05:10

Adrian Grigore