Deserialize for Another App and PC

joe_pool_is

Contributor
Joined
Jan 18, 2004
Location
Longview, TX [USA]
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
 

PrOpHeT

Freshman
Joined
Sep 1, 2004
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,
 

joe_pool_is

Contributor
Joined
Jan 18, 2004
Location
Longview, TX [USA]
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!
 

PrOpHeT

Freshman
Joined
Sep 1, 2004
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.
 
Top Bottom