SolvedPrivate

Develop with .net DLLs on linux & Python

Posted on 2014-10-20
11
31 Views
Last Modified: 2016-02-19
Hi Experts.


I want to have python scripts running on a linux box

The problem is, it has to feed from a DLL.
The dll was compiled on windows, but relies on .net4.5 framework


The reason. Working with robotics custom microcontroller, with the sdk developed in windows (relies on 4.5)

The processing is done on a pc, but want to move it to linux


Any suggestions to make this work?



thanks in advance
0
Comment
Question by:Ess Kay
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 3
11 Comments
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 40393074
You will probably have to completely rewrite it.  There is the Mono project http://www.mono-project.com/   Also read the 'Compatibilty' page because Mono does not support all of .NET 4.5: http://www.mono-project.com/docs/about-mono/compatibility/
0
 
LVL 25

Expert Comment

by:clockwatcher
ID: 40393533
IronPython (https://ironpython.codeplex.com/) runs under Mono.  So if the .Net library you have doesn't rely on any features that Mono doesn't currently support, it should be possible to develop against it using IronPython on linux.
0
 
LVL 15

Author Comment

by:Ess Kay
ID: 40393620
i was thinking about that,  its not open source so i cant rewrite it.  supposedly it requires 4.0,  and cant be run on compact framework.
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 15

Author Comment

by:Ess Kay
ID: 40393622
iron python gives issues setting up,  wont build off git.  ive circumvented it by  downloading the exe file and,  and running it straight from mono.  have not tried to add the dll yet,  was wondering if there are other options
0
 
LVL 15

Author Comment

by:Ess Kay
ID: 40393638
just I suspected:



Traceback (most recent call last):
  File "/home/xxyyzz/Projects/projects/r.py", line 9, in <module>
IOError: [Errno 2] Could not load file or assembly 'System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.



Looks like mono/iron python setup doesn’t have the .net 4.0 accompanied System.speech
0
 
LVL 25

Expert Comment

by:clockwatcher
ID: 40393667
The mono status for the .Net namespaces is at http://go-mono.com/status.  System.Speech hasn't been touched yet and I doubt it will be for a long while.

If you're hoping to run this on a non-MS platform and require System.Speech it's not going to happen.
0
 
LVL 15

Author Comment

by:Ess Kay
ID: 40394580
what if i copy the speech dll
0
 
LVL 15

Author Comment

by:Ess Kay
ID: 40394582
or use winehq for . net 4.0
0
 
LVL 25

Expert Comment

by:clockwatcher
ID: 40395925
Copying the speech dll definitely won't get it working under mono.  System.Speech is going to lean heavily on the native Win32 Speech libraries (http://msdn.microsoft.com/en-us/library/ms723627(v=vs.85).aspx) -- which is why I'm guessing you might have problems with it under wine too.  I doubt that anyone using Wine has worked on porting/testing those libraries.  Ultimately it depends on their dependencies, so it might work, but IMO, at the point that you're copying Microsoft windows DLLs over to wine, you might as well turn to using a VM.  It's worth a try and I wish you luck, but I don't think there's a whole lot of chance that you'll get it to work.
0
 
LVL 15

Author Comment

by:Ess Kay
ID: 40405650
still looking for alternatives.  may try to decompile
0
 
LVL 15

Author Closing Comment

by:Ess Kay
ID: 40708350
The true answer is, can't

The accepted answer has closest solution to obtaining goal, but due to the fact that these classes are reqritted and or adapted to mimic and use certain .net aspect, does not mean all classes are been adapted, and thus is not a complete solution
0

Featured Post

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question