Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I am relatively new to Visual Studio Development and I was wondering - it seems that everytime I make changes to my JS or CSS in my project - I have to "build" the project again.

Is there any way to simply refresh the browser as opposed to building everytime ? My understanding is that all the files are copied to some temporary directory but I was hoping that I can quickly debug/write JS and CSS within the solution and just refresh the browser to see the changes ?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

In my experience, all you need to do is save the CSS/JS files and refresh the browser (hard refresh, not using the browser cache).

The reasons this will not work can be many, but mostly to do with any processing that the files need to go through before the go to the browser - say bundling, minification, usage of ScriptManager or any such server side work (including required deployment) on the files before they are available to the browser.


After chat, we confirmed that the OP is using ScriptManager with CSS/JS, causing the issue.

It is possible that using bundling instead would solve this.

share|improve this answer
    
The answer I was about to give. The keyboard shortcut in most browsers I'm familiar with is ctrl+R. –  scrwtp May 27 '12 at 18:05
1  
@scrwtp - Depending on OS. Ctrl + F5 is the one I know. –  Oded May 27 '12 at 18:06
    
is there any way to debug this prob ? i.e. to find out what exactly is going on so I can try to resolve this issue because its a real pain for me :( –  Andy May 27 '12 at 18:14
    
@Andy - Without more details it is difficult to know how to help. How are you launching the browser? What is serving the pages? –  Oded May 27 '12 at 18:15
    
um basically I just build and then refresh the browser. My file proprities are "Build Action: Content" and "Copy to Output Directory: Do Not Copy" if that makes any difference. Is there any setting in IIS I should look out for ? –  Andy May 27 '12 at 18:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.