Even a chimp can write code

Tuesday, August 15, 2006

WPF deployment errors and what they mean

Platform Requirements Not Met

During deployment, the pre-requisites and references listed in the WPF browser application's (XBAP's) manifests are matched against the libraries accompanying the application (reference assemblies) or those installed in the Global Assembly Cache (GAC). If one or more references in the application manifest cannot be located, the "Platform Requirements Not Met" error is shown.

If you build your WPF app using one version (or CTP) of .NET Framework 3.0 but have another version on the client machine, you will see this error. In addition, you will see a "Get .NET Framework" button so you can download and install the right version of the platform in order to view the app.

 

Trust Not Granted

The "Trust Not Granted" error typically indicates the app is asking for more permissions than are available to it based on its deployment zone, or using features not supported safely in the sandbox. This is the sandbox refusing to run the app. As a workaround, I'd recommend running it from a different zone, say intranet or even Local Machine. If your app however does need to run in that specific zone (say, Internet zone), then you must re-factor the pieces of code that require elevated permissions or rely on features not enabled to run in the XBAP's partial trust sandbox.

Some time ago, there was a bug in the XBAP deployment mechanism of a .NET 3.0 CTP that resulted in the "Trust Not Granted" error showing up in place of "Platform Requirements Not Met", which shows up when your application requires one or more libraries not installed on the client machine. That has since been fixed but if you have older CTP bits of WPF on your client, you could be seeing the error because of this.

Email this | Bookmark this