AX 2012 Visual Studio Project - referencing third-party DLL

I have created a C# class library that I want to reference in AX via CLR interop. This class library relies on a third-party DLL that I have pulled into my project via NuGet. If I add my project to the AOT and deploy it, my DLL will get copied to the client “VSAssemblies” folder, but the referenced third-party DLL does not get copied down.

Is this the expected behavior of the deployment logic in AX? Or is there a way to get AX to copy down both DLLs?

Our production environment is pretty complicated, so I was kind of hoping that I could automate the deployment via the Visual Studo Project stuff. But, if that won’t copy down both DLLs, I’ll have to go back to just adding them as references, and copying them down manually, I guess.

I’m actually still working on the project mentioned above, believe it or not. (Most of it is in production now, but the part that relies on the 3rd party DLL is still not quite ready yet.) I’m now trying to get the 3rd party DLL to deploy using the method described in this blog post:

It seems like AX still doesn’t want to copy the 3rd party DLL down to the VSAssemblies folder though.

I’m not sure if this is because I’m pulling the DLL via NuGet, or if I’m doing something wrong, or if this method just doesn’t always work. The specific DLL I’m referencing is from a package called SSH.NET, and is named “Renci.SshNet.dll”. There doesn’t seem to be anything terribly odd about it. It’s not really big or anything like that.

Has anyone out there had any particular success and/or failure doing this?

I tried Joris’s approach and it did work for me. Maybe MSBuild debugging could help you, although I’ve never used it by myself.