Skip to main content

So, you might have ended here because you got this error message. Unable to retrieve type info for ‘NinjaTrader.NinjaScript.AddOnBase’ from assembly ..

You’ve installed an indicator, or been trying to add a .dll file to code to build something yourself. What went wrong? If you search for this issue, you will find many people asking the same. Ninjatrader support – Well, I could not find much other than, it’s a question they get asked a lot. The typical response is, ‘It’s unsupported’ (which it is, but not very helpful). Or, ‘you are missing something’. Well, you are indeed missing something, and I even found one time when a staff member suggested how you might go through all the dependencies in Visual Studio trying to see which one you are missing.

BUT! There is a better way. A much simpler way! Why on earth Ninjatrader support seems to know nothing about it is beyond me, but, well, that seems normal.

If you get this error, go into your ‘trace’ log folder and look at the last trace from when the issue occurred. In the log, you should find the DLL the error came up for, but, much more importantly, the exact name of the missing file! Now, was that not easy!? Find the file, add it to your bin custom folder if it is not there, add it to your references, compile (for good measure!), restart NT, and see if the error is gone. If not, repeat the process until it is.

If you added the file and the reference, but still get the error, pay attention to the version number. If you add a newer (or much older) version, there can sometimes still be issues until you get compatible versions. The best way to find files is to create a dummy project in Visual Studio, making sure to target the .NET 4.8 framework (the same one NT 8 targets) and find the packages in Nuget. Compile that project and you should get a ready-to-use version of all the needed files in the projects bin folders. You can usually download all the historical versions from Nuget too, to ensure you get matching versions.

If you STILL have issues, check the small text, ‘or one of its dependencies’! Yes, dependencies, have dependencies! You can find these via Nuget too, like this

I hope this helps save someone hours of frustration. Maybe even NT support!

Good luck coders.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.