Proximo
Proximo

Reputation: 6531

How do I create a TypeScript project with Visual Studio 2015

I'm trying to create a typescript project.

Very simply I want my ts files to turn into js files when I build.

I'm using VisualStudio 2015 Enterprise.

I created a Blank WebApplication.

I tried to install Typescript but it says typescript 1.6.3 has already been preinstalled.

When I create a ts file nothing happens.

When I right-click the project I do not have a Typescript tab in Project properties.

Where am I going wrong?

Upvotes: 0

Views: 2119

Answers (1)

Michael Braude
Michael Braude

Reputation: 6973

Make sure you create a TypeScript web project instead of a blank web project in the new project dialog:

enter image description here

When you build the project, VS will compile your ts files into js files. But you won't see them unless you turn on 'show all files' in the solution explorer:

enter image description here

That should be all you have to do. You can configure advanced properties of the build by right clicking on the project file and selecting project properties:

enter image description here

Hope that's enough to get you started.

Upvotes: 4

Related Questions