Anyone here using Visual Studio 2008 to edit Javascript files? Wheneven I try to edit a .JS file (regardless of whether I've created it inside VS2008 or imported it), I get the tab with the file name, but the content doesn't update. I just see the contents of the previous tab, and if I type something, press save, rename the .JS file to something else and open it again, it turns out whatever I typed in is there.

If I "Open with..." the file, selecting source code editor instead of the default script editor, the file shows up fine, and I can work with it, but sadly without intellisense and color mark-up... Which sort of defeats the whole point of buying VS2008.

I've tried the repair option from the VS2008 DVD, but no difference.

I'm using VS2008 v9.0.30729.1 SP1 on a swedish XP Pro SP2, tried restarting VS2008, rebooting etc, nothing helps.

One workaround for me is to enclose the javascript in HTML "<script>" tags and renaming the file .htm and include it that way, but that's... ugly and ...wrong.

If anyone could shed any light on why this happens (or even solve it), I'd be really grateful.

Kind regards,

Per.

I have exactly the same problem... Also VS2k8 (Pro Trial Edition)... Anyone knows how to fix this?

Anyone here using Visual Studio 2008 to edit Javascript files? Wheneven I try to edit a .JS file (regardless of whether I've created it inside VS2008 or imported it), I get the tab with the file name, but the content doesn't update. I just see the contents of the previous tab, and if I type something, press save, rename the .JS file to something else and open it again, it turns out whatever I typed in is there.

If I "Open with..." the file, selecting source code editor instead of the default script editor, the file shows up fine, and I can work with it, but sadly without intellisense and color mark-up... Which sort of defeats the whole point of buying VS2008.

I've tried the repair option from the VS2008 DVD, but no difference.

I'm using VS2008 v9.0.30729.1 SP1 on a swedish XP Pro SP2, tried restarting VS2008, rebooting etc, nothing helps.

One workaround for me is to enclose the javascript in HTML "<script>" tags and renaming the file .htm and include it that way, but that's... ugly and ...wrong.

If anyone could shed any light on why this happens (or even solve it), I'd be really grateful.

Kind regards,

Per.

The solution is to install a Service Pack for Visual Studio. Interestingly, it's not something you can find easily using Windows Update, but it's there, deep in the bat-ridden caves of Microsoft's web site, and it solved the problem for me.

This article has been dead for over six months. Start a new discussion instead.