Adding References - .Net Assemblies - 2.0 & 3.5
Author: cs96ai
Creation Date: 5/2/2010 3:42 PM
profile picture

cs96ai

#1
Hi All,

Just wondering if anyone has had any luck adding a reference to a .Net 3.5 dll.

The error I'm getting is:

"Runtime error: Could not load file or assembly "name of assembly : version : Culture : Public token : " or one of its dependencies at WealthLab.Stratgies.MyWealthLab.Execute.

I'm guessing WL is built using the .Net 2.0 framework and WL dynamically loads the reference that I include in the project.

Since WL has no reference to 3.5 it can't do anything with the 3.5 dll?
I tried to create a 2.0 wrapper for the 3.5 assembly but got the same error.
(couldn't find assembly or one of its dependencies)

Thoughts? Work arounds? Any chance of a 3.5 WL? (hah!)

Puts on thinking cap
-web service
-service
-rewrite code (sighs and rubs eyes...)

=D

CS
profile picture

Eugene

#2
Wealth-Lab 5 is built around the .NET 2.0 framework, dynamically loads the reference, so it shouldn't succeed.

What will work is creating a compiled Strategy library as a .NET 3.5 project. At least a test Strategy using LINQ buried in a compiled library haven't had any trouble loading, showing and executing in WLD 5.6.

Transferring a Strategy into a library is a painless procedure, no need to rewrite code at all, plus you get the benefit of easier debugging in Visual Studio or SharpDevelop. I suggest taking the open source code of Strategies.ActiveTrader, inserting your Strategy, and implementing a StrategyHelper for it. Learning by example is the easiest option here. Helpful links and additional reading:

Strategies.ActiveTrader source code

How can I debug my trading strategies in Wealth-Lab Pro 5?
profile picture

cs96ai

#3
This link was great!


I like the qWhale editor but the VS dev environment is much more familiar to me and the debugging experience is awesome!

Thanks again!

CS


One last note:

One thing I would reccomend to anyone reading this thread is to make sure to check the output directory of the solution.

When you download the sample Strategies.ActiveTrader from the website it might not be set to the correct direction. (right click proeject and set the output directory)
profile picture

Eugene

#4
QUOTE:
When you download the sample Strategies.ActiveTrader from the website it might not be set to the correct direction. (right click proeject and set the output directory)

Well, what's incorrect here is your usage of the words "incorrect/correct" in this context ;)

There's no such thing as the "correct" folder because Wealth-Lab Developer and Pro have different installation folders.

Considering that the "strategy pack" is a standalone project and have never been a demo of the debug article, the output folder of Strategies.ActiveTrader is set absolutely correctly.
profile picture

BigReturns

#5
Very Cool...! Thanks for the info guys!
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).