brusacco 20 Posted April 1, 2013 Report Share Posted April 1, 2013 I have a working test client software using a client DLL in C#.When I try to implement it in the Ubot Plugins Framework, the external DLL its not been loaded.ANy ideas about this? Where should I put the externals DLL so they can be loaded? Thanks. Quote Link to post Share on other sites
Aymen 385 Posted April 1, 2013 Report Share Posted April 1, 2013 well you need to embed the dll with your ubot plugin project , this is a little bit advanced usage ! Quote Link to post Share on other sites
brusacco 20 Posted April 1, 2013 Author Report Share Posted April 1, 2013 Ok I see.... Quote Link to post Share on other sites
socialcracker 59 Posted April 1, 2013 Report Share Posted April 1, 2013 You can either use Aymens way to include it ..(better solution). Or you can use ILmerge for it.. It worked fine for me I have built a plugin using ilmerge, have no problem so far ! 1 Quote Link to post Share on other sites
brusacco 20 Posted April 1, 2013 Author Report Share Posted April 1, 2013 Well, Its working now ... Im using ilMerge.exe, very usefull tool to merge DLL's. Quote Link to post Share on other sites
brusacco 20 Posted April 1, 2013 Author Report Share Posted April 1, 2013 Well, this put and END to my days of UBot going to Wordpress pages for posting If you know what I mean. Quote Link to post Share on other sites
VentureOnline 49 Posted April 1, 2013 Report Share Posted April 1, 2013 Well, this put and END to my days of UBot going to Wordpress pages for posting If you know what I mean. XML-RPC poster would be a nice addition! Quote Link to post Share on other sites
brusacco 20 Posted April 1, 2013 Author Report Share Posted April 1, 2013 I'm finishing one now ... Works great ... And making some Blogger API tests.At the end, I think that UBot will end up been an API framework integrator, and scrapper+spinner. Why we have to navigate to a POST page if the site offers an API?Nice one the plugins addition, that open the pandora box!!! Quote Link to post Share on other sites
Anonym 53 Posted April 1, 2013 Report Share Posted April 1, 2013 "At the end, I think that UBot will end up been an API framework integrator, and scrapper+spinner."Yes, I think there is a severe risk for that. I wonder if the Ubot staff is fully aware of how fragmented the platform is about to become... Pity... (but of course this might be what they are aiming at) 1 Quote Link to post Share on other sites
brusacco 20 Posted April 1, 2013 Author Report Share Posted April 1, 2013 There is any diference in running a node alone, using the "Run Node" and running it inside the normal program? Quote Link to post Share on other sites
VaultBoss 310 Posted April 2, 2013 Report Share Posted April 2, 2013 When you right-click and select RUN NODE from the context menu, both in Code/Node View, as well as clicking the RUN top button of the UBS menu while in Code View, the script will run properly, but many times may hang (won't stop when finished).The only way you can be sure your bot will stop when finished is to click the RUN button (top menu) while in Node View. Is this what you wanted to know? Quote Link to post Share on other sites
brusacco 20 Posted April 3, 2013 Author Report Share Posted April 3, 2013 Never mind ... I was getting some extranges results, but now all is Ok.Thanks. Quote Link to post Share on other sites
Frank 177 Posted July 13, 2013 Report Share Posted July 13, 2013 I too am very interested in a plugin that would provide a xml-rpc conduit. Frank Quote Link to post Share on other sites
UBotDev 276 Posted July 19, 2013 Report Share Posted July 19, 2013 well you need to embed the dll with your ubot plugin project , this is a little bit advanced usage !Aymen, would you be so kind and link to an example that I could follow? Till today I had no problems using ilMerge, but it just won't merge DLLs with the project I'm currently working on (error: "Unresolved assembly reference not allowed: PresentationFramework"). I've tried to implement this approach, but it seems it doesn't embed the DLLs (I think there is something wrong with code snippet). Quote Link to post Share on other sites
Aymen 385 Posted July 19, 2013 Report Share Posted July 19, 2013 Aymen, would you be so kind and link to an example that I could follow? Till today I had no problems using ilMerge, but it just won't merge DLLs with the project I'm currently working on (error: "Unresolved assembly reference not allowed: PresentationFramework"). I've tried to implement this approach, but it seems it doesn't embed the DLLs (I think there is something wrong with code snippet). first of all add the dll as a resource then change Build action to embedded resource , now the complicated part add something like this in your class static NameOfStartupClassHere() //this is the class constractor { AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(Resolver); } static System.Reflection.Assembly Resolver(object sender, ResolveEventArgs args) { try { tmp = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\dll_name_here.dll"; if (!File.Exists(tmp)) { File.WriteAllBytes(tmp, Resources.dll_name_in_ressource); } } catch (Exception z) { } return Assembly.LoadFile(tmp); } 1 Quote Link to post Share on other sites
UBotDev 276 Posted July 21, 2013 Report Share Posted July 21, 2013 Thanks for helping, I appreciate it. first of all add the dll as a resource then change Build action to embedded resource , now the complicated partI've already done that part, but I have a problem with your snippet. Particularly with this part: File.WriteAllBytes(tmp, Resources.dll_name_in_ressource); I guess I should change "Resources.dll_name_in_ressource" and load DLL as Byte Stream? I'm also not sure what's the best place for this part: AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(Resolver); Could you please tell me? Thanks again. Quote Link to post Share on other sites
Aymen 385 Posted July 21, 2013 Report Share Posted July 21, 2013 Thanks for helping, I appreciate it. I've already done that part, but I have a problem with your snippet. Particularly with this part: I guess I should change "Resources.dll_name_in_ressource" and load DLL as Byte Stream? I'm also not sure what's the best place for this part: Could you please tell me? Thanks again. yes change Resources.dll_name_in_ressource with the name of your ressource and as i said this codeAppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(Resolver);should be added in the class constractor Quote Link to post Share on other sites
UBotDev 276 Posted July 25, 2013 Report Share Posted July 25, 2013 Thanks again Aymen for help, I'm getting closer but still have a small problem. I've added "AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(Resolver);" to the class constructor, and it doesn't seem to get executed. For testing purposes I have moved the code that writes DLL to folder"....AppData\Roaming\*.dll" from "static Assembly Resolver" to the class constructor, and the the DLL is read from embedded resources and written successfully, however, "return Assembly.LoadFile(filename);" doesn't load the assembly (even if file already exists), so I'm not sure what's going on (that's why I wrote that it doesn't seem to get executed). Code that doesn't seem to get executed or load DLL: static System.Reflection.Assembly Resolver(object sender, ResolveEventArgs args) { string filename = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\lib.dll"; return Assembly.LoadFile(filename); } Any idea or suggestion from your side? Quote Link to post Share on other sites
Aymen 385 Posted July 25, 2013 Report Share Posted July 25, 2013 Thanks again Aymen for help, I'm getting closer but still have a small problem. I've added "AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(Resolver);" to the class constructor, and it doesn't seem to get executed. For testing purposes I have moved the code that writes DLL to folder"....AppData\Roaming\*.dll" from "static Assembly Resolver" to the class constructor, and the the DLL is read from embedded resources and written successfully, however, "return Assembly.LoadFile(filename);" doesn't load the assembly (even if file already exists), so I'm not sure what's going on (that's why I wrote that it doesn't seem to get executed). Code that doesn't seem to get executed or load DLL: static System.Reflection.Assembly Resolver(object sender, ResolveEventArgs args) { string filename = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\lib.dll"; return Assembly.LoadFile(filename); } Any idea or suggestion from your side? i'm not really sure , should work , maybe you missed something ! Quote Link to post Share on other sites
deliter 203 Posted November 8, 2015 Report Share Posted November 8, 2015 Heres a magic solution,I had the same problem,and I don't know C# at all,even ilMerge seems too advanced this will make the .DLL fairly large but it just works without needing to do anything Nuget Install-Package Costura.Fody in your project then when you build,everything is inbuilt into the DLL Quote Link to post Share on other sites
Evernano 2 Posted November 18, 2015 Report Share Posted November 18, 2015 look forward to seeing this plugin also, good work dude... Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.