Hello QC,
I am trying to use LEAN-CLI in local backtest ( with Visual Studio) but I am encountering a problem with the reference on another local project.
I would like to query my own database using Object relational mapping (Enity Framework).To do this, I add the reference project containing the Model + Context to my Lean-CLI backtest solution.
I run the solution with the command
lean backtest "MyLeanCLIProject" --debug vsdbg
And here the error message:
error CS0246: The type or namespace name 'MyProjectReference' could not be found.
I have the impression that I cannot referencing my external projects. Can you tell me how to do it?
Best!
Derek Melchin
Hi Ad,
To access "MyProjectReference" when "MyLeanCLIProject" is running, "MyProjectReference" needs to be in the "MyLeanCLIProject" directory.
Best,
Derek Melchin
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Jasper van Merle
Hi Ad,
The CLI was updated after Derek's answer. This is the same update we notified you about in private support, but for other visitors of this discussion I'm repeating it here:
The latest version of the CLI supports C# project references like you are used to (with some limitations). This is documented in Code sharing, and similar functionality will also be implemented for Python projects soon. Updating the CLI can be done by running `pip install --upgrade lean` in a terminal.
Ad css
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!