Visual Studio 2012 has some great features for building new apps, but you may run into some issues with pre-existing applications. In my particular case, I found that the "Web Site" project type will no longer support Web Deployment projects.
So, when I load up my solution in Visual Studio, I get an error about the Web Deployment project not being recognized.
"Web Application" projects are the ideal approach, and yes, I want to upgrade someday. But that day is not today. Today I need to get my project built using the same Web Deployment project file.
I know the Web Deployment project type is not available for VS 2012, but if I could at least build the project using the ".wdproj" file as a build script, I would be happy.
Here is how I created a work around...
First, Web Deployment projects are nothing more than an MSBuild project file with some custom build "targets". In VS 2010, when you right-click on the Web Deploy project file and choose "build project", it would run MSBuild.
So... if we enable the build targets and still run MSBuild with the project file, we should be able to build our project.
Install Web Deployment Projects 2010
The Web Deployment project installer is still available from Microsoft. When you install, it will add the build targets to this directory...
C:\Program Files (x86)\MSBuild\Microsoft\WebDeployment\v10.0
For clarity, I copied this directory to a new directory and called it "v11.0"
In this copied directory, open the file Microsoft.WebDeployment.targets in a text editor, and replace all instances of "VisualStudio\v10.0" with "VisualStudio\v11.0"
That should be enough to get the build targets working.
Update Web Deployment Project File
Now locate your Web Deployment project in Windows Explorer. Open the .wdproj file in a text editor.
Near the bottom, there is a line that looks like this...
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WebDeployment\v11.0\Microsoft.WebDeployment.targets" />
Change the "v10.0" to "v11.0" to point to your new targets file.
Run the Visual Studio command prompt and enter the following command (update paths for your project location)...
msbuild [path/to/your/site.wdproj] /property:Configuration=Release
I created a .bat file to save keystrokes, and I just copy the batch file to other projects and update the paths as needed.
Hope this helps someone else out there.