1

I have an application called NinjaTrader that uses .Net 3.5. I have a Strategy that will send order information to a .dll written in .Net 3.5. I need to send this order information to a platform called T4 that currently uses .Net 4.0. I thought about using C++ as my .dll however everything still seems to target "some" .Net assembly. I am currently using a asynchronous client server connection that does a decent job. I just think it would be better to just run it through a .dll or something. Does anybody have any ideas of the most stable solution?

Spencer Davis
  • 141
  • 1
  • 1
  • 9
  • This might be of interest: http://stackoverflow.com/questions/2761640/making-a-call-to-a-net-4-library-from-3-5 – Chris Apr 18 '15 at 21:04

1 Answers1

1

If you're planning on using .NET from C++ you would need to use C++/CLI.

Also, in order to use CLR v4 you would need your project to run in .NET 4. See this question.

The best solution IMO would be to just recompile your project to target .NET 4. There shouldn't be many changes to make in your project assuming it's not a huge project. Have you tried recompiling for .NET 4?

Community
  • 1
  • 1
Francisco Aguilera
  • 3,099
  • 6
  • 31
  • 57
  • yes actually I was able to first compile the dll in 3.5 and then add a reference in the project using 4.0. Then I need to separately compile the project using 4.0 and it builds fine. If I try to build the entire project it gives an error. thanks :-) – Spencer Davis Apr 19 '15 at 16:45
  • Interesting, @SpencerDavis have you looked into the error or started another topic? – Francisco Aguilera Apr 20 '15 at 21:44