WPF - Sharing XBAP and Standalone Deploy
One of the logical questions that come up when you start thinking about WPF application deployment is around the possibility of deploying both as a Standalone and a XBAP style deploy. Big thanks to Rob Relyea for providing some details and pointing me to Karen Corby's posts on the topic and the VS Project template.
Karen Corby posted a VS Project template that can easily switch between the two deployment techniques with the same project: VS Template: Flexible Application (this related blog also has some details about which setting in the project file are different.)
In order for code to run in an XBAP, it must be able to execute in the partial trust sandbox. So if any of the code you want to run in either circumstance needs more permissions, you’ll likely want to use ifdef. This other Karen Corby post lists details of what works in partial trust.
If your doing anything with WPF/ Silverlight and XAML I would also add Rob's blog to your feed list!
Reader Comments