SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Thu Oct 01, 2020 9:37 am

All times are UTC + 3 hours

Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Thu Sep 06, 2012 2:15 am 

Joined: Thu Jun 08, 2006 3:56 pm
Posts: 537
Location: BC Canada
I'm trying to move my development environment to a newer machine. The projects that built fine on the old machine will not build on the new machine because of a failed reference to OpenQuant.API.dll (technically, VS2008 will not resolve the reference and load the API assembly on the new machine).

- same os Win7 Pro SP1 64 bit (but no SQL server installed)
- new machine has a different chip and motherboard, but that shouldn't matter.

- same VStudio 2008, with exported/imported same settings
- same VS code library project files, that use a reference to OpenQuant.API.dll
- same OpenQuant v3.2.2 64 bit installation
- same OQ API dll (I looked at the properties for it)
- VS works fine on the new machine
- OQ works fine on the new machine, running the default projects fine

Yet the new machine won't resolve the project reference to the OQ API dll. It says:

Resolved file has a bad image, no metadata, or is otherwise inaccessible.
Could not load file or assembly 'C:\Program Files\SmartQuant Ltd\OpenQuant\Bin\OpenQuant.API.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

Inside the DLL itself:
Version - 1.0.4190.27124 (on both machines)
Date - 2011-06-22 4:04 PM (on both machines)

Resolved version on old machine, once VStudio loaded it -- Version 1.0.3710.30528
Resolved version on new machine, -- blank, since it could not load.
CLR runtime on both machines = v2.0.50727

Both machines have .NET 2.0, 3.0, 3.5, and 4.0 loaded.
Both machines have VS Project targeted to .NET 3.5 (same VS project file)

The biggest visual difference between the software on the two machines is that the original old machine has a pile of C++ redistributable libs installed, plus some SQL server stuff that came with the VS 2008 installation. But I didn't bother installing the SQL server stuff on the new machine, thinking that it had nothing to do with this problem.

I searched the forums, the net, and my friends, but we are at the end of our knowledge, so I post this to Anton and the guys who can probably solve this faster than an HFT trading algo moves... :-)

Does anyone have advice for me (aside from upgrading both OQ and VS 2008, which I will get around to once this move is done, my old projects build on the new machine, and the current dev project are done). Thanks

PostPosted: Thu Sep 06, 2012 3:51 am 

Joined: Thu Jun 08, 2006 3:56 pm
Posts: 537
Location: BC Canada
Just to save time for anyone puzzling over this problem, I have a partial answer. I reasoned that the machine must be seeing something that I was not, so I did a diff on the project file, because the last checkin was from the old machine, and the current project file was from the new machine.

Sure enough, the project file on the old machine was referencing the 1.0.3710.30528 dll version, whereas BOTH the old and new machines had the 1.0.4190.27124 version in the expected installation directories. There was a hint path in the project files, and the hints pointed to different places. The hint path on the old machine pointed into the compilation Debug/bin directory of the project, whereas the hint path on the new machine pointed into the installation OQ bin directory.

I found the 1.0.3710.30528 version in the project Debug/bin directory, copied it to the new machine (in the project/Debug/bin directory, and referenced it from there), and my code library project was able to build fine. I exported it to the recommended OQ installation directory (c:\program files\sq ltd\oq\bin), and referenced it from there in my OQ projects. Now my OQ projects are building fine.

Could one of you SQ guys make a statement about the two different API dlls with VS 2008, and the CLR runtimes that I'm using? The fact that a custom/older version of the API dll in my utilities library project bin directory makes me think that you told me to put it there a long time ago (because I would not have thought to do such a thing).

Is there any hope of me building _any_ new VS2008 project against the installed 1.0.4190.27124 OQ API library? If so, what must I do? Thanks

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 3 hours

Who is online

Users browsing this forum: No registered users and 4 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group