joe_pool_is Posted July 24, 2009 Posted July 24, 2009 I've got nice a nice piece of software that can serialize and deserialize settings from my project just fine on one PC, but I need to be able to deserialize the file on another PC running a similar (but different) application. I've searched here and online, and it seems I need to use "Assembly.LoadFile(string pathToAssembly)," but are there any directions on how to do this? I'm not sure how to get the path to the assembly if it is running on another PC. Would this require each PC to have a static IP that I could ping and get this information (our network administrator wouldn't go for that). Should I deploy the assembly for the other PC with this application? Would I call this when my form loads or specify it as part of my deserialize routine? Both projects are in the same VS2005 solution, and both projects use the same Strong Name Key. Any guidance is appreciated. Is example code needed? It's just the same, boring binary deserialize routine found all over the web. I'm just trying to use the TCP connection to send files from the creation software to the production software, open that file in a "ready to use" state, and start acting on it. Regards, Joe Quote Avoid Sears Home Improvement
PrOpHeT Posted October 13, 2011 Posted October 13, 2011 Well that depends some on how you are serializing, and what the end goal is. Are you just trying to load a precompiled assembly and execute methods in it dynamically without having to reference it? Or are you using something like BinaryFormatter to serialize an object and then trying to de-serialize that object in another application? If the latter, you may want to consider that two projects by default using the same class will create objects in different name spaces. So Project1.Object is not the same type as Project2.Object by default. If you are simply wanting to load the external assembly have a look here.. http://www.xtremevbtalk.com/showthread.php?t=322494 And see if that is along the lines of what you were looking for, Quote Life is a comedy to those who think; a tragedy to those who feel.
joe_pool_is Posted October 15, 2011 Author Posted October 15, 2011 That was what I did - perhaps a couple of years ago. Basically, I created a separate project with its own namespace that I could serialize/deserialize from either application. Thanks for the note! Quote Avoid Sears Home Improvement
PrOpHeT Posted October 15, 2011 Posted October 15, 2011 Sorry, It was on the recent list when I logged in, did not even check the post time. Must be very little activity in that section... Another unintentional grave dig, I will have to start looking at *when* a post was made before attempting to answer. Quote Life is a comedy to those who think; a tragedy to those who feel.
joe_pool_is Posted October 15, 2011 Author Posted October 15, 2011 This forum used to be much busier. I don't know what happened to it, though. StackOverflow, perhaps? Quote Avoid Sears Home Improvement
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.