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
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With