Announcement

Collapse
No announcement yet.

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.

    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.

        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.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            637 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            366 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            107 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            569 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            571 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X