VS Template: Flexible Application (Deployment)
July 29th, 2006
Karen Corby has posted a great Visual Studio template enabling developers to quickly switch between standalone and .xbap deployment models.
As Karen points out on her blog, it is possible to switch between standalone and .xbap mode by manually editing your .csproj or .vbproj files.* However, her Flexible Application template makes it possible to acheive the same result without the hastle of editing any files.
The flexible application template allows you to select deployment models from the "debug" menu.

For more information and instructions on installing the template, visit scorbs.com. You will find relavant examples and a link to the download in her entry: VS Template: Flexible Application.
*If you are working with older project files, Karen also offers the following instructions for switching deployment models manually:
There are three main tags involved in making something an “XBAP”:
<Install>False</Install>
<TargetZone>Internet</TargetZone>
Other tags are required for the “XBAP” debug experience, etc:
<MapFileExtensions>False</MapFileExtensions>
<StartAction>Program</StartAction>
<StartProgram>$(WINDIR)\System32\PresentationHost.exe</StartProgram>
<ApplicationExtension>.xbap</ApplicationExtension>
<StartArguments>-debug “$(MSBuildProjectDirectory)\bin\$(Configuration)\$(AssemblyName)
$(ApplicationExtension)”</StartArguments>
If you comment out all of the above tags and add the following, your app will run as a standalone: