Error when using designer

SyntaxEditor for Windows Forms Forum

Posted 17 years ago by Danny Liberty
Version: 4.0.0234
Avatar
After I used the designer to set the Document lanaguage, I get this error message every time I open my form in designer mode:
An encryption key greater than zero must be specified for secured languages.

To fix this, I have to manually edit the .designer.cs file and change this line:
this.dynamicSyntaxLanguage1 = new ActiproSoftware.SyntaxEditor.Addons.Dynamic.DynamicSyntaxLanguage(this.components);

to:
this.dynamicSyntaxLanguage1 = new ActiproSoftware.SyntaxEditor.Addons.Dynamic.DynamicSyntaxLanguage("VBscript", false);

I have to do this every time I make a change to the syntax editor control and it is very annoying.

How can I solve this?

Comments (5)

Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Danny,

You can just turn off the secure property of the language in its XML definition like this:

<SyntaxLanguage Key="Assembly" LanguageDefinitionVersion="4.0" Secure="False"
   xmlns="http://ActiproSoftware/SyntaxEditor/4.0/LanguageDefinition">


Actipro Software Support

Posted 17 years ago by Danny Liberty
Avatar
Still the same error.
Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Make sure you reload the language in the designer since it only reloads that option if you pick the file again, etc. Also if you have multiple languages in the designer tray, do it for all of them.


Actipro Software Support

Posted 17 years ago by Danny Liberty
Avatar
I've used my source control to revert my form to it's state before the control was inserted and done everything from scratch. Still the same problem. I am using your ActiproSoftware.VBScript.xml supplied file (and I changed it to Secure="False").

Danny
Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
It appears to be a bug in the constructors in that they are not setting the secure property to false. This is now fixed for the next maintenance release. Sorry for the inconvenience in the meantime.

Also, after looking at the code, I don't believe the Secure attribute needs to be set to false in the XML. The XML definition loader will ignore that attribute when loaded in the designer. And thus it gets serialized out to false when the designer code is saved. So ignore my first reply to you.

Everything should work as expected in the next maintenance release.


Actipro Software Support

The latest build of this product (v24.1.0) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.