0

I'm trying to add TypeScript to an existing:

  • web-site (not a web-application)
  • web forms (not MVC)
  • Visual Studio 2012

I think, at a fundamental level, the problem is that an ASP.net web-site has no project. This means there is no ability to define "Build options". An ASP.net web-site cannot declare that a *.ts file should have a build action of Compile, since without a project file there are no build actions.

Obviously i'm not going to convert to a web-application (due to the unresolvable disadvantages of a web-applications).

Having said that, how do i add TypeScript to an:

  • ASP.net
  • web-site
  • web-forms
  • Visual Studio 2012

solution?

Bonus Reading

2 Answers 2

0

You can simply add typescript files to the project and manage the compilation externally (outside of visual studio) using something like grunt-ts https://github.com/basarat/grunt-ts (disclaimer : I am one of the authors)

Sign up to request clarification or add additional context in comments.

Comments

0

You can add a *.ts file to the web folder, then run the ts compiler from the command prompt.

Or create a separate web app with just the TS file. Then in the build properties, add a command to copy it to the desired location.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.