We are using Visual Studio 2010 and in our production environment we put a bunch of our resources on a CDN. However, when we are debugging locally, we want to pull the resources from a relative local path.
So in our CSS, I’d like to be able to have our CSS as when I run it locally:
.foo {
background:url(../images/bar.jpg);
}
However, when I publish to Azure, I want to have the CSS automatically update the path to:
.foo {
background:url(http://cdn.company.com/website/images/bar.jpg);
}
Is this possible in Visual Studio 2010?
I realize this likely isn’t the answer you’re looking for, but for reference, you could do this with the
FileUpdateTask in MSBuild Community Tasks, which would look something like this: