I thought that creating my application with WPF and XAML would make it more portable, maybe even executable over the web, but I'm having trouble figuring out how this works with VS 2012. The resources I'm looking at are saying that I need to create a XBAP, which should be an option when creating a new project in VS 2010. But my choices for a new C# application in VS 2012 are:
- Windows Forms Application
- WPF Application
- Console Application
- Class Library
I created my application as a WPF application, and switched it to target .NET 3.5 client profile so as to be more backward compatible. But whether my application is embedded in a ZIP file or provided as a straight EXE, both Chrome and IE 9 report that it is likely malicious. I don't remember ever getting such alarming warnings even on pre-.NET executables before. Why the sudden alarmist response from the browser on an application that is supposed to be able to run in a sand-boxed safer environment no less?
I have tried Signing the assembly and providing a ClickOnce installer and signing the ClickOnce manifest. This allows it to run a bit more nicely in IE, but not in Chrome.
I tried switching the project security settings to "This is a partial trust application", but that yields the error "That assembly does not allow partially trusted callers." And when I add [assembly: System.Security.AllowPartiallyTrustedCallers]
to AssemblyInfo.cs, then I get an error trying to load PresentationFramework.dll: "Request for the permission of type 'System.Security.Permissions.UIPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."
What happened to XBAP? Can VS 2012 Express not create browser applications?