I run VS2010 Web Developer and I set a javascript variable to one value for testing. When I publish my work, I that variable should be another value to affect the final behavior. So, in the rumpa.js file i have the following.
$(document).ready(function () {
var iable = "test value";
...}
However, just before I execute publish, I manually edit the line so it looks as follows.
$(document).ready(function () {
var iable = "publish value";
...}
It works great, except I often forget to change the iable to "publish value" until an unhappy customer calls. That is not optimal development technique.
Can I somehow make VS change my source code so I won’t have to?
You could use config transformation files. This way you can have different settings for each publish profile. More info can be found here: http://blog.hmobius.com/post/2010/02/17/ASPNET-40-Part-4-Config-Transformation-Files.aspx