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 SalmaTrader, 07-07-2026, 10:26 PM
|
0 responses
47 views
0 likes
|
Last Post
by SalmaTrader
07-07-2026, 10:26 PM
|
||
|
Started by CarlTrading, 07-05-2026, 01:16 PM
|
0 responses
22 views
0 likes
|
Last Post
by CarlTrading
07-05-2026, 01:16 PM
|
||
|
Started by CaptainJack, 06-17-2026, 10:32 AM
|
0 responses
15 views
0 likes
|
Last Post
by CaptainJack
06-17-2026, 10:32 AM
|
||
|
Started by kinfxhk, 06-17-2026, 04:15 AM
|
0 responses
21 views
0 likes
|
Last Post
by kinfxhk
06-17-2026, 04:15 AM
|
||
|
Started by kinfxhk, 06-17-2026, 04:06 AM
|
0 responses
23 views
0 likes
|
Last Post
by kinfxhk
06-17-2026, 04:06 AM
|

Comment