Cannot add python assembly reference for IronPython DLR app

ล็อกแล้ว Cannot add python assembly reference for IronPython DLR app

  • 4 เมษายน 2555 13:32
     
     

    Hello,

    I received the following error when attempting to add a reference using Visual Studio for a C# IronPython DLR app:

    [A reference to 'NpyAccessLib.dll' could not be added.  Please make sure that the file is accessible, and that it is a valid assembly or COM component.]

    The complete path to the dll was omitted.  The assembly is part of Numpy for .NET.  A different assembly was added successfully. 

    Any suggestions?

    williamj



    williamj

ตอบทั้งหมด

  • 4 เมษายน 2555 16:53
     
     คำตอบ

    Hi williamj,

    the file is a native DLL which means you can't add it to a .NET project via Add Reference...

    you can use it via DllImport

    see http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.dllimportattribute.aspx

    Regards

    Sophia

    • ทำเครื่องหมายเป็นคำตอบโดย williamj8 9 เมษายน 2555 13:40
    •  
  • 9 เมษายน 2555 13:42
     
     

    Sophia:

    Thanks for your reply.

    How did you know the assembly was native?

    And, I am not sure which native methods to implement in managed code.

    Regards,

    William


    williamj