Decoupling TypeScript from ASP.NET in Visual Studio

Topics: General
Mar 1, 2013 at 5:21 PM
I seems as though in Visual Studio, all TypeScript projects live inside an ASP.NET project. When I choose "HTML Application with TypeScript", I get /bin and /obj directories created in my project dir with empty ASP.NET dll's behind dropped in my /bin directory. I find this quite annoying as the application I'm writing is purely a client-side browser app.

I did find some strange "Virtual Projects" feature by accident in VS. Basically if I drop a .ts file in VS from Finder / Explorer, it spiders the <reference/> graph and displays all those files in the Solution Explorer. It lets me to TypeScript dev without generating a pile of useless files.

So I went ahead and wrote a build script that would scan my directory hierarchy for .ts files, and create a giant file called Home.ts that contains a <reference path="whatever" /> for each .ts file in the project dir. Then I just open the Home file, and it all works.

This actually solved my problem for a while, however, at some point it VS stopped recognizing file-system level changes to this Home.ts file, so every time I added a new file, I had to close the project and open it again to get it to re-spider the Home.ts file.

Is this "Virtual Projects" feature documented anywhere? I can't find any references to it anywhere. I feel like I'm the only one using it.

And is there a better way to make an actual TypeScript project without generating all this additional crap?

I've actually moved to WebStorm for this very fact, but I'd be willing to switch back to VS if I can make this work.