I'm trying to create my first "hello world" XSLT extension. I have some problems.
I created the extension usning vb.net 2008 as simple as possible like this:
Namespace xlstTest
Public Class helloWorldExt
Public Shared Function sayHello() As String
Return "Hello world"
End Function
End Class
End Namespace
I copied the dll to the bin foldere and added this :
to the xsltExtension.config file.
When i try to use the extension in an XSLT file i get this YSOD:
Could not load type xlstTest.helloWorldExt (C:\inetpub\wwwroot\bin\HelloWorldExt.dll) for XSLT extension C:\inetpub\wwwroot\bin\HelloWorldExt.dll. Please check config/xsltExentions.config.
I really tried to check everything according to the umbracoTV video, and i can't see what i'm doing wrong. Can anybody spot my mistake ?
XSLT extension problem
I'm trying to create my first "hello world" XSLT extension. I have some problems.
I created the extension usning vb.net 2008 as simple as possible like this:
Namespace xlstTest
Public Class helloWorldExt
Public Shared Function sayHello() As String
Return "Hello world"
End Function
End Class
End Namespace
I copied the dll to the bin foldere and added this :
to the xsltExtension.config file.
When i try to use the extension in an XSLT file i get this YSOD:
Could not load type xlstTest.helloWorldExt (C:\inetpub\wwwroot\bin\HelloWorldExt.dll) for XSLT extension C:\inetpub\wwwroot\bin\HelloWorldExt.dll. Please check config/xsltExentions.config.
I really tried to check everything according to the umbracoTV video, and i can't see what i'm doing wrong. Can anybody spot my mistake ?
Thanks
Mikael
Hi Mikael,
Did you name your Assembly HelloWorldExt (= the same as projectname)?
Cheers,
Richard
Yes the name of both my project and the DLL file is HelloWorldExt.
Your method needs to be static thats the way when umbraco loads using reflection it picks up xslt extension methods.
Regards
Ismail
My guess is it's some sort of security issue. Did you move the file to bin folder?
Try copying it instead. This will make Windows adapt the folder security
/Jesper
Ismail:
shared in VB.net = static in C#
Jesper:
i did copy the dll file, but i will double check the security settings
Tanks both
Mikael
It doesent seem to be a access rigths problem, i just tried to give "everyone full control" to the file, and i still get the same YSOD.
I hope i'm right about public static in c# being public shared in VB.net, but i'm rather sure about that.
mikael
Hm, did you make a typo? xlstTest instead of xsltTest?
I double and triple checked everything for typos, and i'm quit sure that is not the problem either.
Mikael
SOLVED.
My geek college fond the problem, it was a double namespace.
In VB there is an implicit namespace and i added one one too.
So i had namespace.namespace.classname.
As soon as i deleted the namespace i put around my class, everything worked as expected.
Thanks for all your suggestions
Mikael
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.