问题
I am using Visual Studio 2013 Update 1
I have written some code in TypeScript some days before, but most part of the code is commented.
Today, I uncommented that code and trying to debug JavaScript file.
The strange thing is that I am seeing commented code in generated dynamic JavaScript.
My guess is that TypeScript is bringing this code from Cache.
So, to clear this cache I have restarted Visual Studio, cleared Internet Explorer Browser Cache, done iisreset, restarted system... all the pains with no luck.
Not understanding how to solve the problem!
回答1:
I can see the same behavior in Visual Studio Code. It kind of caches the .ts files, so when I do a build using Ctrl+Shift+B it generates the .js file using the old .ts files. Restarting visual studio helps.
回答2:
TypeScript does not cache output.
Have you confirmed that any compilation is happening at all? Does the "modified" date on the .js file change?
来源:https://stackoverflow.com/questions/22843118/typescript-javascript-cache-issue