I am using Agile .NET's virtualization features since a time, and I have wanted to try their Code Encryption. The obfuscation completes fine, but once I deploy my DLL with It, the application just doesn't work.
I hardly found that the obfuscator will provide you some dlls like AgileDotNetRT and AgileDotNetRT64, in the options, but I don't get any.
I even tried copying those dlls from the install folder without luck.
Anyone knows why? I haven't found any info on the "docs".
Old question, but Encryption doesn't work on mono, which was confirmed by the devs.
Related
I have followed this example on how to mix C# and C++ code in single assembly and all compiles fine. But all this is from the developer command prompt. I want to put all this in one Visual Studio solution and can't succeed. Does anybody know how to do that? (I am still very inexperienced with Visual Studio)
I have found several articles about this, but all give examples from the command prompt. This SO answer even recommends not doing this at all, not sure why?
Also, many of those articles talk about creating a managed DLL (using dllexport/dllimport, but I need to link the obj/lib files directly in the same C# assembly.
Note: The reason I need to do this, is to add a licensing static library to my C# desktop application project. The library is written in C/C++ and is already used in my back-end, I would like to use the same logic for the front-end. Loading the library as a DLL would defeat the purpose since anybody could just change it for a fake one. Therefore linking it in the same assembly is essential.
I am currently developing a standalone application using C#, and I am facing a problem for which I can't find a solution. Indeed, my script uses two libraries (provided by an external company), however, one is made for 64-bit systems and the other for 32-bit systems. So here is my problem, as soon as I try to use both libraries at the same time, I always get an error:
System.BadImageFormatException
I've already tried to build my project for "Any CPU", "x64" and "x86" but I always have the same problem.
So I would like to know if it is possible to solve this problem in order to be able to use both libraries in the same script or is there another technique to achieve the same result?
Thank you in advance,
Clément
If the libraries use third-party standard windows dlls this will be a lot harder.
However, just decompile the library, and rebuild it in your chosen bitness.
Note 1 : Beware this might be infringing licence agreements
Note 2 : Some decompilers might be a little hit and miss
I have one c# Application which i have only published Application in IIS and i don't have the original code with me.
we have to make some changes in one (.cs) file which is dependent on entire application and dlls.
Is it possible to convert the Application and make some changes and publish again.
I did run into this situation before where client is only having published code and I need to enhance a product.
For those , I decompiled published DLLs using Telerik's JustDecompile as I found it more mature and accurate than DotPeek and Reflector.
Few of the things will still not work after decompilation and that is obvious so you will need to manually fix those.
You may also remove few of the layers by introducing your own layer to avoid all DLL decompilation , but for that you need to understand decompiled code.
I hope that it will help you in running project.
Thanks,
Background
I'm currently doing a benchmark of solutions to convert java code to c#
We have a fast evolving java software and wan't to port some low level (not ui) apis with a tool, because maintaining all changes between versions could prove really tiresome...
Anyway, I've been trying to use Sharpen, as I heard it's a pretty wicked tool used by some mono "freaks" to keep some versions of their tools in check.
What I did
For this purpose, I tried several tutorials I found on internet, the easiest to understand being http://www.pauldb.me/post/14916717048/a-guide-to-sharpen-a-great-tool-for-converting-java
As the link he gives for a pre-build sharpen plugin is now broken, I build my own version of the plugin using sources and instructions found here : https://github.com/xamarin/XobotOS/
Result
The plugin build perfectly, and is installed in my eclipse folder. But when I try to run the ant script after setting everything up, I get an error :
java.lang.RuntimeException: Application "sharpen.core.application" could not be found in the registry.
Conclusion
Well. I'm lost here.
I have no idea what that means.
I'm using Windows 7 64bit
I'm using Eclipse 3.7
I'm using java 6 sdk 64 bit
If anyone ran into this and has a solution... That be helpful.
Thanks in advance.
Initially I tried the same approach as you did, with the same result. But if you follow the instructions in the README.build file, section Setting things up, you should be able to launch a secondary Eclipse applications with the sharpen.core and sharpen.xobotos plug-ins included.
You could then import your Java project subject to conversion into the secondary Eclipse app, provided that you have included a Sharpen Xobot builder command and nature into your project file, like this .project file in the XobotOS/android folder. I edited the .project file manually before importing the project, but I assume you can also configure this from within Eclipse?
The configuration files provided by Paul Du Bois are not applicable, instead you will need to copy and edit the converter-config.xml file from the XobotOS/android folder. This file in turn references a file in the app sub-folder, which probably also needs to be copied and edited.
This is basically as far as I have been able to take it until now. I have been able to edit the configuration files to enable the converter to run, but at this point I have only been able to generate C# stubs. If you or someone else manages to take this even further, I would be happy to learn how to generate real C# files using the XobotOS Sharpen converter.
UPDATE
Asked Miguel de Icaza if there were any instructions for converting arbitrary Java projects using the XobotOS Sharpen version. He responded that there are many hard-coded details in this version that makes it difficult to apply to arbitrary projects. At this stage he recommends Lluis Sanchez' Sharpen version to be used instead.
BTW, the NGit library has been moved to here. You will find a fully functional sharpen plug-in for Eclipse in the gen/plugins sub-folder.
UPDATE MAY 17
Note that you need to have the Plug-in Development Environment software installed in Eclipse to be able to build and run the plug-in projects. IF you are running Eclipse IDE for Java (SE) Developers, you need to extend it with the PDE software.
Forgive me for asking a common question, but I couldn't quite get what I needed from what I found so far.
First question - SQLite. I am using this DB as in my C#.NET 3.5 windows service and it works great, I was looking for a portable solution, because I would like port my service to a linux daemon etc, using Mono, which seems to support it. However, I am not sure how to implement this. I had thought the dll was compatable, but it seems there is a seperate dll for Mono/.NET which I should have expected. Does this mean I need to seperately code/compile for each platform or is there something that would allow me use of SQLite with the same code on various platforms? I have encountered this a few times in my searches, csharp sqlite, a "reimplementation". To be honest, this is quite new to me, is it of use? The Mono SQlite page says that they Mono.Data.Sqlite code is based on System.Data.SQlite and goes on to say...
"We have chosen this way as means to
provide a migration path for
developers using SQLite in their .NET
applications"
Are they referring to creating a new, seperate binary? Or could I run my code as is with some adaptation?
Second question - GUI. As far as I can tell the two main options for cross platform dev in .NET would be GTK# and Winforms. Again however, its the specifics of implementation that are a bit hazey. Can I create a win forms GUI in visual studio as I normally would then easily migrate this using mono? Or should I develop this in something like X-Develop or MonoDevelop?
Many thanks for your advice/patience :D
To help out a little bit here I used the full mysql dll file that was provided and I was able to compile my program on windows using visual studio, and then deploy it to Linux without changing anything(except the case of the mysql dll file, which is kind of annoying you'll see what I mean at some point).
Also from what I've heard winforms isn't totally supported by mono yet, but I may be wrong. I haven't done a gui cross platform yet, but I would test winforms first, just so you could develop it in visual studio, and if that doesn't work I think GTK should be fine.
You just need to make sure that the dll's are compiled for .net 3.5 or below and you should be fine(90% of the time).
Check this out here, http://www.mono-project.com/MoMA and also the link that chris provided.