I'm in the process of upgrading our project from 11.1.542 to the new 12.1.560. Our project was already using .NET 4.0 before, and now your assemblies are .NET 4.0 as well, which is great, i suppose.
However i've been running into some problems with that. From what i understand Security has changed a bit in 4.0 (http://msdn.microsoft.com/en-us/library/dd233103.aspx).
At first i got the following compile error on classes that used our own custom subclasses of WizardPage and SyntaxEditor.
'Inheritance security rules violated by type: 'X'. Derived types must either match the security accessibility of the base type or be less accessible
To fix this i added the following to the AssemblyInfo:
After this, there were still compile warnings from our XBAP project for every reference to an Actipro assembly (references added according to the documentation, with Copy Local set to true)
Reference 'ActiproSoftware.Wizard.Wpf' does not allow partially trusted callers.
I figured it's only a warning, so i tried to run/debug the XBAP project anyway, but that failed with a SecurityException (no further info in debug mode)
System.Security.SecurityException was unhandled
Message: That assembly does not allow partially trusted callers.
Then i remembered that you guys have an XBAP demo running on your site, and when i try to run that (http://www.actiprosoftware.com/files/demos/online/wpf/samplebrowser.xbap) i get a similar exception:
System.Windows.Markup.XamlParseException: 'Set property 'System.Windows.ResourceDictionary.DeferrableContent' threw an exception.' Line number '3' and line position '6'.
---> System.MethodAccessException: Attempt by security transparent method 'System.Windows.Markup.StaticExtension.GetFieldOrPropertyValue(System.Type, System.String, System.Object ByRef)' to access security critical method 'ActiproSoftware.Windows.Themes.SharedResourceKeys.get_TreeViewItemStyleKey()' failed.
Assembly 'System.Xaml, Version=22.214.171.124, Culture=neutral, PublicKeyToken=b77a5c561934e089' is marked with the AllowPartiallyTrustedCallersAttribute, and uses the level 2 security transparency model. Level 2 transparency causes all methods in AllowPartiallyTrustedCallers assemblies to become security transparent by default, which may be the cause of this exception.
I also searched for an XBAP sample project, figuring that could at least show me a working configuration, but i couldn't find one in the samples. So now i'm wondering: am i doing something wrong, or did the XBAP/partial trust support break in 2012.1?
[Modified 7 years ago]