How to install parquet.dll?

I am trying to use parqeut.NET with ninjatrader 8 ( NuGet Gallery | Parquet.Net 4.23.3 ) and NT is not recognizing the parquet.dll in custom folder.

I registered the dll

I edited the xml to add netstandard2.0

still, does not work. However error did change to:

Any tips, such as version you are using with ninjascript, much appreciated.

That version might be too new for the .net 4.5 needed for NT

I thought NT8 is using .NET 4.8? Here’s one of the posts from support saying that:

Above posts actually links to change log confirming upgrade to 4.8 in 2020:
8.0.23.0 Release Date

November 16, 2020

Features

.NET 4.8 Upgrade

General

Feature #14630

NinjaTrader 8 is built utilizing Microsoft’s .NET framework. Microsoft recommends upgrading to .NET Framework 4.8 to receive the highest level of performance, reliability, security, and long-term support from Microsoft. This update is expected to be entirely transparent as most users already have .NET framework 4.8 automatically installed via windows update. When installing NinjaTrader, it will prompt you if you need to install .NET 4.8, and if required, you can download it here. Additionally, as a result of this update, Windows 8.1 becomes the minimum supported operating system.

You’re correct…my mistake I meant 4.8.
I’ll try installing it and see if I have any luck…wait do you have particular add-on, or are you just installing parquet.net?

I have it installed. I used VS Code > open the NinjaTrader 8 folder, giving it quick access to the .csproj file.

Here was my prompt, since it was a trial for me:
"I’d like to attempt to have you install this. It will mean that the references, dependencies, and everything else have to be in place for NT.

NuGet Gallery | Parquet.Net 4.23.3

Currently NT is not running…if it needs to be you can execute it, and I’ll sign in"

My suggestion would be that you modify and have validate that your decencies and preferences are correct…but it is working

Problem sovled.

Here’s my write up from Codex (desktop app)

Problem
I was trying to reference Parquet.dll from NinjaTrader 8 and kept getting this compile error:

CS0012: The type 'Object' is defined in an assembly that is not referenced.
You must add a reference to assembly 'netstandard, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.

I also got this startup popup:

Unable to retrieve type info for 'NinjaTrader.NinjaScript.AddOnBase'
from assembly 'Parquet': Unable to load one or more of the requested types.
Retrieve the LoaderExceptions property for more information.

Cause
The issue was not actually AddOnBase.

Parquet.dll was built against .NET Standard 2.0, and NinjaTrader 8’s NinjaScript compiler did not automatically reference netstandard.dll. Also, some of Parquet’s dependency DLLs were not in the folder where NinjaTrader expects third-party assemblies.

NinjaTrader was able to find Parquet.dll, but it could not fully load/compile against it.

Final Working Fix

  1. Close NinjaTrader completely.

  2. Put Parquet.dll and all of its dependency DLLs in:

C:\Users\<YourUser>\Documents\NinjaTrader 8\bin\Custom

In my case, I copied all DLLs from my third-party folder into bin\Custom, including:

Parquet.dll
Microsoft.Data.Analysis.dll
Microsoft.Bcl.AsyncInterfaces.dll
Microsoft.IO.RecyclableMemoryStream.dll
System.Buffers.dll
System.Memory.dll
System.Numerics.Vectors.dll
System.Runtime.CompilerServices.Unsafe.dll
System.Text.Encodings.Web.dll
System.Text.Json.dll
System.Threading.Tasks.Extensions.dll
System.ValueTuple.dll
System.Collections.Immutable.dll
Apache.Arrow.dll
Snappier.dll
ZstdSharp.dll
IronCompress.dll
nironcompress.dll
Microsoft.ML.DataView.dll
  1. Copy the .NET Framework 4.8 facade netstandard.dll from:
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\Facades\netstandard.dll

to:

C:\Users\<YourUser>\Documents\NinjaTrader 8\bin\Custom\netstandard.dll
  1. In NinjaTrader’s References window, remove any old reference pointing somewhere else, for example:
C:\Users\<YourUser>\Documents\NinjaTrader 8\thirdparty\Parquet.dll
  1. Add the correct references from bin\Custom:
C:\Users\<YourUser>\Documents\NinjaTrader 8\bin\Custom\Parquet.dll
C:\Users\<YourUser>\Documents\NinjaTrader 8\bin\Custom\netstandard.dll
  1. If NinjaTrader keeps removing the netstandard.dll reference, manually add it to:
C:\Users\<YourUser>\Documents\NinjaTrader 8\Config.xml

Inside the <References> section, add:

<string>*MyDocuments*\NinjaTrader 8\bin\Custom\netstandard.dll</string>

Mine ended up looking like this:

<string>*MyDocuments*\NinjaTrader 8\bin\Custom\Parquet.dll</string>
<string>*MyDocuments*\NinjaTrader 8\bin\Custom\netstandard.dll</string>
  1. Also confirm that NinjaTrader.Custom.csproj contains:
<Reference Include="Parquet">
  <HintPath>C:\Users\<YourUser>\Documents\NinjaTrader 8\bin\Custom\Parquet.dll</HintPath>
</Reference>
<Reference Include="netstandard">
  <HintPath>C:\Users\<YourUser>\Documents\NinjaTrader 8\bin\Custom\netstandard.dll</HintPath>
</Reference>
  1. Delete the NinjaTrader cache folder if the startup popup persists:
C:\Users\<YourUser>\Documents\NinjaTrader 8\cache
  1. Restart NinjaTrader and compile again.

Important Notes

The key fix was adding netstandard.dll as an actual NinjaTrader reference, not just copying it onto the machine.

Also, NinjaTrader may regenerate NinjaTrader.Custom.csproj from Config.xml, so adding the reference only to the .csproj may not persist. Adding it to Config.xml was what made the fix stick.

Caveat
NinjaTrader support generally recommends third-party DLLs be built directly for .NET Framework 4.8 or lower. A .NET Standard DLL can cause extra dependency/reference problems like this. The cleaner long-term solution is to use a .NET Framework 4.8 build of the library if available.

Hope this helps.

1 Like

Knowing that it’s possible helps a lot, but wait there’s more! I apreciate all the details, I’ll give it another go this weekend.