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 CarlTrading, 03-31-2026, 09:41 PM
|
1 response
65 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
35 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
59 views
1 like
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
62 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
51 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment