Any suggestions in compiling source for High Trust?

May 9, 2012 at 10:41 PM

Hi,

I modified the source to include a call to AllowPartiallyTrustedCallers and strongly sign the assembly. My application has to run in a sandbox so my permissions are a bit tight. However, I am getting a weird exception that doesn't makes sense to me. Anyone else encounter this?

When creating a new GraphLayout<A,B,C> I get 

System.Windows.Markup.XamlParseException occurred
  HResult=-2146233087
  Message='The invocation of the constructor on type 'UserControl.MyGraphLayout' that matches the specified binding constraints threw an exception.' Line number '197' and line position '14'.
  Source=PresentationFramework
  LineNumber=197
  LinePosition=14
  StackTrace:
       at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
       at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
       at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
       at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
       at UserControl.GraphUserControl.InitializeComponent()
       at UserControl.GraphUserControl..ctor()
  InnerException: System.TypeInitializationException
       HResult=-2146233036
       Message=The type initializer for 'GraphSharp.Controls.GraphLayout`3' threw an exception.
       Source=GraphSharp.Controls
       TypeName=GraphSharp.Controls.GraphLayout`3
       StackTrace:
            at GraphSharp.Controls.GraphLayout`3..ctor()
            at Stru2.UserControls.ScenarioUserControl.MyGraphLayout..ctor()
       InnerException: System.Security.VerificationException
            HResult=-2146233075
            Message=Operation could destabilize the runtime.
            Source=GraphSharp.Controls
            StackTrace:
                 at GraphSharp.Controls.GraphLayout`3..cctor()
            InnerException: