Posted 18 years ago by Ricardo Goncalves
Hi, our company just bought the version 4 of the syntax editor and a new error appeared :

Message "An error occurred while loading the DynamicSyntaxLanguage '{Unknown}':\r\nThe syntax language type 'SyntaxEditor.CSharpDynamicSyntaxLanguage, SyntaxEditor' could not be loaded.\r\nThe problem occurred near line 1, position 2\r\nin Unknown Stream." string

StackTrace " at b1.a(DynamicSyntaxLanguage A_0, XmlTextReader A_1, String A_2, Boolean A_3)\r\n at b1.b(DynamicSyntaxLanguage A_0, XmlTextReader A_1, String A_2)\r\n at b1.a(IDesignerHost A_0, XmlTextReader A_1, String A_2, DynamicSyntaxLanguage A_3)\r\n at b1.b(IDesignerHost A_0, XmlTextReader A_1, String A_2, DynamicSyntaxLanguage A_3)\r\n at b1.c(IDesignerHost A_0, XmlTextReader A_1, String A_2, DynamicSyntaxLanguage A_3)\r\n at ActiproSoftware.SyntaxEditor.Addons.Dynamic.DynamicSyntaxLanguage.a(IDesignerHost A_0, Stream A_1, Int32 A_2, DynamicSyntaxLanguage A_3)\r\n at ActiproSoftware.SyntaxEditor.Addons.Dynamic.DynamicSyntaxLanguage.LoadFromXml(String path, Int32 encryptionKey)\r\n at ActiproSoftware.SyntaxEditor.Document.LoadLanguageFromXml(String filename, Int32 encryptionKey)\r\n at Form1..ctor() in D:\\Workspace\\Temp\\Form1.cs:line 22" string

in the line :
editor.Document.LoadLanguageFromXml("ActiproSoftware.CSharp.xml", 0);

In the version 3 this was fine, any problem or sugestion?

In the example of the dragDropForm the code is the same and it works..

Thanks in advance

Comments (1)

Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Ricardo,

Yes in v3.1 there were semantic parser classes that you used for outlining. But in v4.0 we made the entire language object model more robust. So you can have a custom DynamicSyntaxLanguage class loaded as the based class for an XML definition. These custom language classes can inherit DynamicOutliningSyntaxLanguage which gives outlining functionality just like the old SemanticDefaultParser class did.

What is happening here is that you are trying to load a language type "SyntaxEditor.CSharpDynamicSyntaxLanguage, SyntaxEditor" for your XML definition but it isn't found in your assembly. Remember the first part ("SyntaxEditor.CSharpDynamicSyntaxLanguage") is the namespace and type and the second part ("SyntaxEditor") is the assembly. So typically it would be this:
MyCompanyNamespace.MyProductNamespace.CSharpDynamicSyntaxLanguage, MyAssemblyName

Let us know if that helps.

One other note, since you are referencing a DynamicSyntaxLanguage type, it must be included in one of the assemblies in your AppDomain or it will not be found.

[Modified at 10/10/2006 12:03 PM]

Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.