So I started an application as a WPF Browser Application (XBAP – Xaml Browser APplication) and quickly noticed that I needed to do some things that really should be in a stand alone app for CAS reasons. I found a blog entry by Karen Corby that showed how to do this way back in ‘06. She wrote a cool Visual Studio project template that would let you target XBAP vs. Stand Alone.
In 2009 this is still applicable. Here is what she said to edit in your CSPROJ file to accomplish the change.
You can do this by manually editing the .csproj or .vbproj.
There are three main tags involved in making something an “XBAP”:
<HostInBrowser>True</HostInBrowser>
<Install>False</Install>
<TargetZone>Internet</TargetZone>
Other tags are required for the “XBAP” debug experience, etc:
<EnableSecurityDebugging>false</EnableSecurityDebugging>
<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…
<Install>True</Install>
…your app will run as a standalone.
http://scorbs.com/2006/06/04/vs-template-flexible-application
ded2e9b6-fa43-4d52-8e11-6812dab098a9|2|3.0