Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

reference to NAudio library - error for loading NAudio.WinMM library

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    reference to NAudio library - error for loading NAudio.WinMM library

    Hi,

    I tried to use Naudio library for my custom indicator but I have troubles to add a references to this library in NinjaScript editor.

    I downloaded NuGet package of this library using Visual Studio which downloads 10 libraries in total (including necessary dependencies, see attached photo). Then I added manually all these libraries as a references in NinjaScript Editor. I tried to run just a simple piece of code to test the functionality of library but Im receiving error that system cannot load NAudio.WinMM library (system cannot find library file). I tried many times to reload this library but without any success. Code is compiled without any problem. Error message is created during code runtime.

    Could you please help me to solve this problem? Is is possible to use NAudio library in NinjaScript?
    Attached Files

    #2
    Hello libas,

    While our support cannot directly help with third party references I can provide details on what would be required to use external references.

    For a dll to be used in NinjaTrader it needs to be placed inside the Documents\NinjaTrader 8\bin\Custom folder along with any resources that it uses. The file needs to be referenced using the NinjaScript editor as well. When using nuget that may download the incorrect version of a package, you need to make sure the dlls are designed to be used by .NET framework and not other frameworks like netcore or standard.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Hi Jesse,

      thank you for the advice..didnt know about this recommended location for libraries. I copied all the libraries to this location and referenced them again in NinjaScript editod but unfortunatelly my problem still remains the same.

      Do these DLL files need to be located directly in Custom folder or is allowed to place them lower in the folder structure? (Documents\NinjaTrader 8\bin\Custom\nuget\naudio)

      Do you have any other advice to try?


      Comment


        #4
        Hello libas,

        The dlls and resources need to be directly inside the custom folder, if they reside in sub folders or outside of that directory they will fail to load.
        JesseNinjaTrader Customer Service

        Comment


          #5
          Is there any logfile where can I get more information about this error?

          Comment


            #6
            Hello libas,

            The control center log tab shows errors. If you are seeing some kind of error it may help to post that however the platform in general isn't able to provide very detailed logs when an assembly cannot load, in most cases you just see that the library was unable to be loaded if some part of its resources or code could not be loaded.
            JesseNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by haas88, 03-21-2024, 02:22 AM
            18 responses
            208 views
            0 likes
            Last Post haas88
            by haas88
             
            Started by Board game geek, Today, 02:20 AM
            0 responses
            2 views
            0 likes
            Last Post Board game geek  
            Started by knighty6508, Today, 01:20 AM
            2 responses
            14 views
            0 likes
            Last Post knighty6508  
            Started by franatas, Today, 01:53 AM
            0 responses
            3 views
            0 likes
            Last Post franatas  
            Started by knighty6508, Today, 01:17 AM
            0 responses
            9 views
            0 likes
            Last Post knighty6508  
            Working...
            X