Hack Forums
[.NET] AForge.NET and CodeDom - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] AForge.NET and CodeDom (/showthread.php?tid=4499759)



AForge.NET and CodeDom - imi-tat0r - Oct 20, 2014

I am wondering if there is a way to use the AForge.NET Library in code, that is being compiled via codedom later.
Like compiling it with the needed DLLs being in the same Folder or anything like that :o

greets
imi-tat0r


* - Chris White - Oct 20, 2014

use this: http://msdn.microsoft.com/en-us/library/system.codedom.compiler.compilerparameters.referencedassemblies(v=vs.110).aspx
Add full path to the assemblies you want to reference, and at running the compiled applications the referenced assemblies need to be in the same directory


* - imi-tat0r - Oct 21, 2014

so there is noway to put them into the ressources and load them from there without dropping or anything


* - Nikey646 - Oct 21, 2014

(Oct 21, 2014 05:00 AM)imi-tat0r Wrote:  so there is noway to put them into the ressources and load them from there without dropping or anything

That's an entirely different nutshell, you need to look into Reflection, and someone posted some code on loading Libraries from Resources recently to prevent random .dll files from laying around.

After implementing that into your stub, you need to look into generating and including a .resources file (compiled to .resx) into your Output file.

I've done the second part previously, but it was in C#. If you want the code (Although, insanely messy!) just ask...Not sure how much help it'll be.