Click here to Login





                                                   What version of .Net does QS's C# compiler use?

  0

0
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


No more messages
0




Reply:

No html code. URLs turn into links automatically.

Type in the trading objects you want to include: - Add Objects
To add a trading object in your message, type in the object name, select it and then click on "Add Objects"










QuantShare

Trading Items
Unexpected Short Selling Bars
System Metrics v2.0
Fixed Fractional Position Sizing
RandomValsMT
Currency Mgmt v 0.9

How-to Lessons
How to install the previous version of QuantShare
What is the Bookmark Panel?
How to debug a downloader
How to download a trading item from the Sharing Server
How to automatically arrange charts?

Related Forum Threads
.NET framework version
What about this strategy?
How do I use version 3.42 with custom data?
Does IFF always call embedded functions regardless of true/false?
Latest version

Blog Posts
QuantShare Version 2.1.0 - Trading Software
QuantShare Trading Software: New Features in the 3.4.1 Version
QuantShare Trading Software: New Features in the 3.3.1 Version
QuantShare Trading Software: New Features in the 3.7.0 Version
QuantShare Trading Software: New Features in the 3.1.2 Version









QuantShare
Product
QuantShare
Features
Create an account
Affiliate Program
Support
Contact Us
Trading Forum
How-to Lessons
Manual
Company
About Us
Privacy
Terms of Use

Copyright © 2024 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items



Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.