Posted 18 years ago
by V.Pena

Hello,
I am trying to use CodeHighlighter for ASP.NET (version v4.0.0042)in a .NET 2 website. I'm trying to format C# code, however I get the following error message:
Exception Details: ActiproSoftware.SyntaxEditor.InvalidLanguageDefinitionException: An error occurred while loading the DynamicSyntaxLanguage '{Unknown}':
The syntax language type 'CodeHighlighterTest.CSharpDynamicSyntaxLanguage, CodeHighlighterTest' could not be loaded.
The problem occurred near line 1, position 2
in Unknown Stream.
Here's my code: <pre>
<CH:CodeHighlighter ID="CodeHighlighter1" runat="server" LanguageKey="C#">
int test = 0;
int testing = 5;
</CH:CodeHighlighter></pre>
I've done the following:
1. Modified my web.config to include the entries for CodeHighlighter
2. Imported ActiproSoftware.CodeHighlighter.Net20.dll to my BIN folder
3. Imported all the Language files (along with the Lexers folder) to my website
4. Added <%@ Register TagPrefix="CH" Namespace="ActiproSoftware.CodeHighlighter" Assembly="ActiproSoftware.CodeHighlighter.Net20" %>
to my .aspx page
The strange thing is that if i set the LanguageKey to "XML", the code works and is formatted correctly. However, any other language, such as C# or CSS will not work.
I've tried changing the SyntaxLanguageTypeName attribute in ActiproSoftware.CSharp.xml to reflect my websites name: 'Experiments.CSharpDynamicSyntaxLanguage, Experiments' but this doesn't work either.
Any ideas how to fix this?
Thanks!
I am trying to use CodeHighlighter for ASP.NET (version v4.0.0042)in a .NET 2 website. I'm trying to format C# code, however I get the following error message:
Exception Details: ActiproSoftware.SyntaxEditor.InvalidLanguageDefinitionException: An error occurred while loading the DynamicSyntaxLanguage '{Unknown}':
The syntax language type 'CodeHighlighterTest.CSharpDynamicSyntaxLanguage, CodeHighlighterTest' could not be loaded.
The problem occurred near line 1, position 2
in Unknown Stream.
Here's my code: <pre>
<CH:CodeHighlighter ID="CodeHighlighter1" runat="server" LanguageKey="C#">
int test = 0;
int testing = 5;
</CH:CodeHighlighter></pre>
I've done the following:
1. Modified my web.config to include the entries for CodeHighlighter
2. Imported ActiproSoftware.CodeHighlighter.Net20.dll to my BIN folder
3. Imported all the Language files (along with the Lexers folder) to my website
4. Added <%@ Register TagPrefix="CH" Namespace="ActiproSoftware.CodeHighlighter" Assembly="ActiproSoftware.CodeHighlighter.Net20" %>
to my .aspx page
The strange thing is that if i set the LanguageKey to "XML", the code works and is formatted correctly. However, any other language, such as C# or CSS will not work.
I've tried changing the SyntaxLanguageTypeName attribute in ActiproSoftware.CSharp.xml to reflect my websites name: 'Experiments.CSharpDynamicSyntaxLanguage, Experiments' but this doesn't work either.
Any ideas how to fix this?
Thanks!