How do I reference (make use of) WebKit-Sharp in OSX? - c#

I have a C#-project in MonoDevelop and I want to use WebKit-Sharp as suggested in this tutorial: http://shana.worldofcoding.com/en/programming.html. My problem is that I don't know how to reference/install WebKit in OSX.
I found rpm's (installation files) from the given repositories but I couldn't execute them with rpm5 and when I extracted them I didn't find any file that I was able to reference from my project.
I've been looking through https://github.com/mono/webkit-sharp, but aren't sure if anything from there could do the job.
Can I reference anything from github or somewhere else to make WebKit work in MonoDevelop and OSX?

If you extract the rpm for webkit-sharp, the dll is in ./usr/lib/mono/gac/webkit-sharp/somehash/webkit-sharp.dll
You should be able to import that into your References in the project (search for it from the .Net Assembly tab after you extract it).

Related

Import Custom .NET Library into Blue Prism Automate Folder

I am trying to create a custom library in C# using Visual Studio and then be able to refer to it from code-stages in BP objects. I know that the .dll has to be placed in the Automate folder for BP to see it, but what about .exe, config and all other files? Just placing the .dll only in the Automate folder doesn't seem to work for me. I did reference it under Code Options on the Initialize page and also placed a Namespace under Namespace Imports. But BP still tells me that the library is missing. Do I need to package as NuGet or some other way? I have zero experience doing this, so I am sorry if this is basic.
I was wondering if someone could point out some tutorial or information on how to do this A-Z, or maybe share their experience doing this? Thank you.
If you want to create a DLL to be used with Blue Prism, the best thing to do is to compile the code with all its references and resources into a single DLL.
I have always used Costura Fody to achieve that for usage in BP several times.

Trying to connect a ergometer to pc using a SDK but program can't find dll

I'm trying to connect the concept2 ergometer with a PM4 with a computer so I can use it's input in a game made in Unity3D.
The company of the ergometer provides a SDK that's in C++ (I don't have experience with C++).
I'm using this code to wrap the C++ code in C#.
Here I replace "RPPM3DDI.dll" with "PM3DDICP.dll" and "RPPM3Csafe.dll" with "PM3Csafe.dll".
When I run the code the program throws the following exception:
System.DllNotFoundExeption for DLL PM3DDICP.dll
I put the files of the SDK in the solution folder so that's not it I guess...
So I read (on stackoverflow) that there can be problems with the dependencies and I used DependencyWalker. I got a ton of messages of missing dependencies but it turns out that DependencyWalker is not being maintained and some changes in Windows are causing the missing dependency reports...
The goal is to get the speed that a person is rowing with and use it in Unity3d.
The questions now are:
How can I use this SDK when he can't find the dll file?
How can I locate the dependency issues among all the 'fake' missing dependencies?
I found the problem and I thought: maybe this answer is usefull for someone else too.
The problem was that I put the SDK files in the wrong folder (noob mistake I know...).
I needed to put the files in: Project folder -> bin -> Debug
I couldn't find this solution on the internet

Unable to find an entry point named 'FreeImage_GetFileTypeU' in DLL 'FreeImageNET'

I just downloaded FreeImage 3.15.4 Win32 and I'm trying to go through their C# samples. I have a 64-bit Windows 7 machine with Visual Studio Express 2010, so I recompiled the samples to 64 bit as described here (http://www.sambeauvois.be/blog/2010/05/freeimage-and-x64-projects-yes-you-can/). I also had to change the name of the "FreeImageLibrary" string in FreeImageStaticImports.cs in order to get the sample applications to start (the produced DLL was named FreeImageNet and not FreeImage as the samples expected).
However when I run the samples, I get an "Unable to find an entry point named 'FreeImage_GetFileTypeU' in DLL 'FreeImageNET'." error whenever I call a FreeImage function. The samples reference the library that contains the DLLImport statements, so I'm not really sure what's broken here. Does anyone have experience with FreeImage and C# that could offer some advice? Thanks!
I also had to change the name of the "FreeImageLibrary" string
That's how you got into this trouble. There are two DLLs involved here. FreeImage.dll is the native DLL, it contains the FreeImage_GetFileTypeU export. FreeImageNET.dll is the managed class library that contains the wrappers for the native DLL, it doesn't have that export as the exception message told you.
What you should have done was rebuild the native DLL from source so that you got the 64-bit version of FreeImage.dll. That blog post told you how to do that. And offered a download, ymmv.
It must also be copied into the build output folder so that it can be found at runtime. An easy way to do that is to add it to your project with Project + Add Existing Item and set its "Copy to Output Directory" property to "Copy if newer".

Creating a C# Portable Class Library using command line csc.exe?

I have not found any information on how to do this, or even if it's possible at all.
http://msdn.microsoft.com/en-us/library/e13syb43
does not mention anything about building a portable class library, and
http://msdn.microsoft.com/en-us/library/gg597391.aspx
does not mention anything about a command line interface.
Has anyone else tried to do this and found a solution/found it to be impossible?
Building portable libraries via the command-line is possible, you just need to pass the correct framework references. These determine what platforms you will support.
First, is the reason you want to do this via the command-line because you don't have Visual Studio Pro? If so, it gets a little tricky.
Normally you would build csproj with MSBuild from command line instead of manually calling csc.exe.
On other hand the project seems to be set of assemblies - you should be able to give correct set of references (may also need to disable default libraries) via csc command line and build by hand.
http://msdn.microsoft.com/en-us/library/gg597391.aspx will take you which supporting assemblies can go into your dll, or where it can be deployed.
http://videojugpages.com/pages/610-Microsoft-Visual-C-Express-Setup This link will show you how to create your dlls at the command line. This is pretty straightforward, and the general dll is no different from the portable type, except in where it can be deployed and on what it can depend. Hope this helps.

Unable to load DLL 'UNRAR.DLL': The specified module could not be found

I just downloaded UnRAR.dll from http://www.rarlab.com/rar_add.htm package includes C# sample project when I run in VS 2010 after selecting .rar file for extract I am getting below error message
and when I add reference unrar.dll I am getting below error
Please help / point me what I am missing?
UnRAR.dll is not a .NET assembly so it cannot be used as a project reference.
It is a native DLL so you'll have to use P/Invoke to access its methods or write a C++/CLI wrapper around it.
There's some sample code in this MSDN forum thread that should provide a decent starting place and show the necessary approach.
There also appears to be a fairly complete wrapper included in the Blue Mirror CD/DVD Indexer project.
It should also be noted the SevenZipSharp includes support for this out-of-the-box. I haven't used it myself, but it might be worth checking into.
The sample you are talking about use
[DllImport("unrar.dll")]
to access the functions inside the library.
This DLL should be visible when the test project runs.
So you should copy it into the BIN\DEBUG folder or in a
folder where your project runs.

Categories

Resources