I\'ve got an existing Visual Studio project that was setup as a \"Web Site\" project. You can create projects like this by going to File->New Web Site. This is a different
For this to work on my setup, I have the "Automatically compile TypeScript files which are not part of a project" checkbox checked.
But this wasn't enough. For automatic compilation to work in a website project, I had to create a tsconfig.json file with the following configurations:
{
"compilerOptions": {
"noImplicitAny": false,
"noEmitOnError": true,
"removeComments": false,
"sourceMap": true,
"target": "es5",
"alwaysStrict": true,
"module": "amd"
},
"compileOnSave": true,
"exclude": [
"node_modules",
"wwwroot",
"packages"
]
}
The "compileOnSave": true setting is the crucial one here. It's what triggers automatic compilation.
Typescript version 2.1.5 on Visual Studio 2017