|
Chaim6
2014-10-23 22:00:15
|
|
What version of .Net is the C# compiler?
Thanks.
|
|
|
|
QuantShare
2014-10-24 02:02:00
0
|
|
.Net 2.0
But you can reference DLLs from any other version of .Net.
|
|
|
|
Chaim6
2014-10-24 09:49:14
0
|
|
Would this effectively upgrade the .Net version? If not, can you elaborate on when this would be useful? For example, can LINQ be supported through DLLs? Let's say for example that you want to use the .Sum() method of a List. Would including the .Net DLLs make it work?
Thanks.
|
|
|
|
QuantShare
2014-10-25 04:45:18
0
|
|
Yes, you can use LINQ in a DLL then reference that DLL into QuantShare (Not in QuantShare script editor)
You just need to tell .Net, which version to use when running QuantShare.
This can be done by creating a config file. Create a file, call it "QuantShare.exe.config", save it under "QuantShare" directory.
The file content could be for example:
<?xml version="1.0"?>
<configuration>
<startup>
<supportedRuntime version="v4.0"/>
<supportedRuntime version="v2.0.50727"/>
</startup>
</configuration>
This will force QuantShare to start using the 4.0 version of .Net
|
|
|
|
Chaim6
2014-10-25 21:49:13
0
|
|
Okay, I tried following these instruction exactly.
I cut and pasted those lines and saved it to "QuantShare.exe.config" under the "QuantShare" directory. I then restarted QS and tried the following code:
using System;
using System.Collections.Generic;
using System.Linq;
List<double> test = new List<double>()
{
1,
2
};
Divers.Output("Test results: " + test.Sum());
I got the message:
The type or namespace 'Linq' does not exist in namespace 'System' (are you missing an assembly reference?)
Removing all the 'using' lines gave the following error:
Error...
System.Collections.Generic.List<double> does not contain a definition for 'Sum' and no extension method 'Sum' accepting a first argument of type System.Collections.Generic.List<double> could be found. (are you missing an assembly reference?)
Thanks.
|
|
|
|
QuantShare
2014-10-27 02:34:52
0
|
|
As I told you in my previous message, you can use LINQ in a DLL (with an external editor) then reference that DLL in QuantShare. You cannot reference LINQ directly in the script editor.
|
|
|
|
Zoidberg
2015-08-04 20:06:33
0
|
|
Hi QS,
I did as you suggested above to make QS use .Net 4.0, and hey presto I can now use linear algebra using Math.Net:-) Thanks!
Perhaps topic for a blog by you later ("How to use linear algebra libraries is QuantShare")?
However, after doing this, every time i start QS i get a window saying "The application encountered a problem
Please report this error by clicking on send
Unexpected behaviour (1)", and when quitting I get a popup with "The application encountered some problems ..."
This happens whether the Math.Net dll is copied to the QuantShare directory (needed for using it) or not.
Still, QS seems to run OK.
Should I worry about these messages (corruption of databases, wrong results, ...), or is it just a "cosmetic flaw" somewhere?
|
|
|
|
QuantShare
2015-08-05 02:55:47
0
|
|
Why don't you put the library in another directory and reference it from that directory?
|
|
|
|
Zoidberg
2015-08-05 03:29:19
0
|
|
It (earlier) didn't seem to find the DLL without having it in the QuantShare directory, but working now... Maybe I just needed to restart.
Anyway, this doesn't address my main question: What about the error windows? These are unrelated to the third-party DLL it seems, they appear even after I removed the reference. so seems to be a result of moving QuantShare to .Net 4 in the way you suggested. Any ideas?
|
|
|
|
QuantShare
2015-08-05 13:46:45
0
|
|
Please send us the last trace files you can find under c:\program files\ctrading\quantshare\trace to support email.
|
|
|
|
Zoidberg
2015-08-06 19:39:06
0
|
|
I sent a log file demonstrating the problem to support (let me know if you need more info).
I had a look at the problem myself (possible due to informative log-files),
and the solution seems to be to add the following inside <configuration></configuration>:
<runtime>
<loadFromRemoteSources enabled="true"/>
</runtime>
Do you agree that this should be OK (internet security etc)?
Thanks!
|
|
|
|
QuantShare
2015-08-07 06:15:39
0
|
|
Please check your email
|
|
|
|