+1 888 340 6572
MultiCharts Project Management
Go to the previous open issue
Go to the previous issue (open or closed)
Please log in to bookmark issues
Open Bug report MC-1079

mc.net not referencing external .dll properly

Go to the next issue (open or closed)
Go to the next open issue

I've made some progress on adding an external .dll reference to mc.net but still no dice.
Mc.Net exhibits strange behaviors leading me to believe there is a bug, or multiple bugs in the mc.net handling of the referencing

Strange behaviors:

  1. If I add a reference to the VS PlStudies8 project in VS it does not show up in mc.net editor
  2. If I add a reference to the .dll in the mc.net editor the script will compile with the reference to the MxChartsIO.dll
  3. If I only add the reference to the mc.net editor (do not add ref in VS first) the reference does not appear in VS
  4. If I add a reference to the dll in VS BEFORE I have added the reference in the mc.net editor, when I close and then reopen VS the reference (in VS) is lost.
  5. If I add a reference to the dll in VS AFTER I have successfully added the reference in the mc.net editor, when I close and then reopen VS the reference remains

1. After I have successfully compiled the MxChartsIO.dll
a. I exit VS, mc.net, mc.net editor
b. I restart mc.net, mc.net editor
c. I open a test indicator; the indicator compiles correctly with the using MxChartsIO directive;
d. When I edit in the mc.net editor, the editor responds with intellisense correctly
e. When I add a new method to the mc.net script referencing MxChartsIO the script compiles correctly.
2. I now open VS and edit the MxChartsIO.dll to add a new public method
a. I recompile in VS
b. When I go to the mc.net editor the C# script compiles
c. Intellisense does NOT respond correctly (does not find the new method)
d. I can type in the proper syntax for the new method and the mc.net editor will compile
e. If I close and then reopen mc.net intellisense works correctly.
3. As long as the syntax is correct the mc.net script compiles correctly in both VS and the mc.net editor

1. I open mc.net and attempt to insert the study I have created
a. I get the following error message from mc.net

Stranger Still:
1. Now, oddly enough when I tried the entire exercise with a single public method (public bool test()) in the .dll
a. The script compiles and runs correctly in mc.net.
2. When I tried the exercise with nothing but a single public method returning a double (public bool testDouble())
a. The script compiles but fails in mc.net.
3. When I retried the exercise, this time with all the test methods in the attached project
a. The script compiles but fails in mc.net.
4. The error message is the same in all the failed examples above.

Steps to reproduce this issue


1 I created a simple test dll: MxChartsIO.dll
a. It exposes several public methods
i. testBool()
ii. testRef()
iii. testOut()
iv. testDouble()
v. testRandomDouble()
vi. testRandomDouble(double close)
vii. testTryCatch()
viii. testThrow()
4. I have created a simple test mc.net C# script referencing the .dll
a. It is a simple modification of Mov_Avg_1_Line
b. It attempts to call the MxChartsIO methods in the CalcBar() method.

Comments (4)
user-offline.png  MultiCharts Support (MultiCharts)
Aug 08, 2012 - 01:55
  • "When external dll reference is created in .Net Editor this reference is not added in PlStudies* project" - This issue is confirmed. It will be fixed.
  • All references should be added through MultiCharts .Net Editor only. There is only one direction of synchronization: from ÐultiСharts .Net editor to PlStudies* project. The changes done in VS for PlStudies* project would not be saved and would not show up in MC.Net editor.
  • Re: Intellisense - That is not a bug, though we agree that this behavior is inconvenient. We will evaluate possible improvements for it.
user-offline.png  dHinckley (rivertrader)
Aug 16, 2012 - 02:14

having used the workaround suggested by Andrew I can reference an external .DLL.  I can reference functions, but seemingly not get the indicator class i am building to reference an interface in the external .dll.  This would be particularly helpful as it would insure consistency in all indicators conforming to the interface contract with the facing .dll.

user-offline.png  dHinckley (rivertrader)
Aug 16, 2012 - 04:07

another behavior:  In mc.net you can add [Input] to a var of ennumerable type and the selections within the enum will show in mc.net in the format study dialog.  very cool.  But when I attempt to reference a public enum in the referenced dll to do the same thing, the mc.net compiler chokes, gives me a .dll not found int a .net break dialog (rather than pl.net output)

user-offline.png  MultiCharts Support (MultiCharts)
Oct 17, 2012 - 19:51

Thank yuo for your comment. We will look into it.

Issue basics
  • Type of issue
    Bug report
  • Category
    Not determined
  • Targeted for
    MultiCharts 8.5 (RELEASED)
  • Status
  • Priority
    Not determined
User pain
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
Affected by this issue (2)
People involved
Times and dates
  • Posted at
  • Last updated
Issue details
  • Reproducability
    Not determined
  • Severity
Attachments (0)
There is nothing attached to this issue
Commits (0)
There are no code checkins for this issue
Duplicate issues (0)
This issue does not have any duplicates