Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • lingjing 28 posts 45 karma points
    May 04, 2010 @ 04:22
    lingjing
    0

    Problem with register my own dll

    Hi All. I created a .Net libary project. It looks like below:

    namespace MyNamespace
    {

      public class XXX

      {}

    }

     

    In the umbraco, I try to register this dll file and call it inside my template like below:

    <%@ Import Namespace="MyNamespace" %>

    <script runat="server" Language="C#">

     protected void Page_Load(object sender, EventArgs e)

    {

    }

    </script>

     

    Can anyone tell me how I can add the reference of my dll file into umbraco? I try "xsltExtensions.config", but it does not seems working.

    Thank you

     

    jing

  • atze187 160 posts 215 karma points
    May 04, 2010 @ 08:34
    atze187
    2

    Hi,

    "xsltExtensions.config" is the wrong place to go for, you need to copy the dll file to the bin folder and change the line

    <%@ Import Namespace="MyNamespace" %>

    to

    <%@ Import Namespace="MyNamespace" Assembly="MyNamespace.dll" %>

    André

  • atze187 160 posts 215 karma points
    May 04, 2010 @ 13:41
    atze187
    0

    Damnit, I mixed up @Import and @Register. The Import-directive does not support the assembly attribute.

    But you need to copy your dll file to the bin folder.

  • lingjing 28 posts 45 karma points
    May 04, 2010 @ 23:05
    lingjing
    0

    Hi Andre

    Thanks for reply, I did copy my dll file to the bin folder. but it does not work.

    Jing

Please Sign in or register to post replies

Write your reply to:

Draft