- ago
Is it possible to compile two or more files. I have some common code between two scripts and will like to put the common code in a common file and compile that common file with both the scripts. I am expecting that common file to grow larger over time.
0
661
5 Replies

Reply

Bookmark

Sort
- ago
#1
Yes, of course. You can create a library in Visual Studio, target .NET Core 3.1, putting desired functions there. Adding a reference to it in Tools > Assembly References makes it accessible to all your code-based strategies.
0
- ago
#2
I do not use Visual Studio. And it seems too much of a hassle to get into Visual Studio world and all of its problems.

Can this be provided in the WealthLab itself - either compiling a script to library or may be have WL include other files during compilation with something like
CODE:
// wlinclude MyInclude/common.cs


0
- ago
#3
Thanks to Wealth-Lab's extensibility, it's optimal to outsource seldom used features like integrated debugger or custom code library to the best in the field tools.

I cannot agree with you on that this is a hassle and full of problems. Modern IDEs like Visual Studio Code make this task straightforward and pleasant, at the same time reducing the product's code base complexity:

https://code.visualstudio.com/
0
- ago
#4
If I update code in Visual Studio and build a DLL, then will WealthLab automatically pick the new changes? I think some applications are not able to reload a modified DLL. Can WealthLab reload the new DLL automatically in the next run of a script?
0
- ago
#5
Haven't had time to test it yet but reasonably your assembly should get loaded into application's domain and locked for external editing. However, there still is a possibility to update your library while WL7 is running. You can accomplish this with "Edit and Continue" feature in Visual Studio:

https://www.wealth-lab.com/Discussion/New-instruction-for-using-Visual-Studio-to-develop-and-debug-strategies-5494, Post #15

I have no idea if this is supported by VS Code, likely not.
0

Reply

Bookmark

Sort