ComponentFactory / Krypton

Krypton WinForms components for .NET
BSD 3-Clause "New" or "Revised" License
1.9k stars 691 forks source link

Problem with security exceptions #108

Open opentp opened 6 years ago

opentp commented 6 years ago

Hi guys, i compiled the dynamic link libraries without any errors but got this curious problem at debbung the sample applications. Is there anyone who can solve my problem? It throws follow message in german:

System.MethodAccessException HResult=0x80131510 Nachricht = Fehler beim Versuch der SecurityTransparent-Methode "ComponentFactory.Krypton.Toolkit.VisualForm..ctor()" nativen Code über die Methode "ComponentFactory.Krypton.Toolkit.PI.CreateCompatibleDC(IntPtr)" aufzurufen. Methoden müssen sicherheitskritisch oder sicher sein, um nativen Code aufzurufen. Quelle = ComponentFactory.Krypton.Toolkit Stapelüberwachung: at ComponentFactory.Krypton.Toolkit.VisualForm..ctor() in C:\Users\TH\Desktop\Krypton-master\Source\Krypton Components\ComponentFactory.Krypton.Toolkit\Controls Visuals\VisualForm.cs:line 114 at ComponentFactory.Krypton.Toolkit.KryptonForm..ctor() in C:\Users\TH\Desktop\Krypton-master\Source\Krypton Components\ComponentFactory.Krypton.Toolkit\Controls Toolkit\KryptonForm.cs:line 118 at OutlookMailClone.Form1..ctor() in C:\Users\TH\Desktop\Krypton-master\Source\Krypton Ribbon Examples\Outlook Mail Clone\Form1.cs:line 24 at OutlookMailClone.Program.Main() in C:\Users\TH\Desktop\Krypton-master\Source\Krypton Ribbon Examples\Outlook Mail Clone\Program.cs:line 27

Did i make anything wrong with the compiling? Thanks for help!

probs

PWagner1 commented 6 years ago

It might be because some of the required DLLs are not referenced in your solution. Please check that the DLLs required are attached to your application before compiling. If you're not sure which DLLs to reference, then just attach all 6 of them, VS will figure out the rest.