Right-click the website in Solution Explorer and select "Add Network Deployment Project."
Whenever this new WDP project is created, it will replace all the configuration items you specify. You may also have different versions depending on the build of Debug or Release. It works for almost all configuration options, including the connection string. There is a lot of documentation on how to properly configure it on the network, just search for "Project Web Deployment Project".
This is definitely a new “default” way for this, until MS decides to make it more formal in some future version of .Net / Visual Studio, if any.
source share