Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Trying to reference custom .dll in strategy
Collapse
X
-
Trying to reference custom .dll in strategy
Hi all. I'm trying to use an assembly I wrote from a strategy, and I'm getting errors. It compiled, but in the log I get an error for each OnBarUpdate: could not load file or assembly 'myAssembly. The system cannot find the file specified.' So... the steps I followed: I added the reference and a reference the assembly is dependent on, added a using declaration, restarted, added one of my types to the code, compiled. Any ideas?Tags: None
-
Hi Matt, I hadn't seen your post but was just coming back to say "solved, I had targeted .net 4." We're in business, thanks for the response.
Comment
-
Hi,
I am trying to do the same thing here with the third party DLL log4net.
I downloaded the source for it from Apache and set the project to point at .NET 3.5 and then built the DLL, with no errors logged.
I referred my Ninjascript to it and even re-started Ninja, but I am getting
2013-11-26 14:55:38 Default Error on calling 'OnStartUp' method for indicator 'PermaCodeSR006': Could not load file or assembly 'log4net, Version=1.2.13.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
This has got to the limit of my knowledge. What else can I do to satisfy .NET here?
Comment
-
Sure.
It's attached. Had to zip to make it uploadable.
In my OnStartUp routine, I only have to have one line of code, any line, referencing the DLL and it causes the error.
e.g.:
PatternLayout patternLayout = new PatternLayout();Attached Files
Comment
-
Perhaps that helps as well to get further going - http://www.codeproject.com/Articles/...logging-librar
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
672 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
379 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
111 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
577 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
582 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment