Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
SolvedPrivate

Develop with .net DLLs on linux & Python

Posted on 2014-10-20
11
Medium Priority
?
37 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 84

Accepted Solution

by:
Dave Baldwin earned 1500 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
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
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…
Suggested Courses

704 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