I have created a solution and added the “NinjaTrader.Custom” project. I have also created a separate class lib project in the solution (targeting net48) - and have most of my custom code there. I have tried to consume this assembly from the “NinjaTrader.Custom” project, via a Project Reference. It builds fine in VS. However … When building via Ninja, it does not see the dependency. When I add the reference in Ninja to the dll (via the Ninja Editor), it corrupts Ninja - and I have to reinstall NinjaTrader and start all over.
Then … I tried NOT adding the project reference in VS - and directing the custom class lib build output to the “bin\custom” folder (as specified in a Ninja doc I was reading). Now … If I make changes in custom class lib (in VS), the solution build fails - because NinjaTrader app has a lock on the custom dll. It’s very inconvenient to have to close NinjaTrader anytime I want to make changes and test.
Question:
What is the best practice for isolating code in a separate assembly?