Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

  • 2 years later...
Posted

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,

Life is a comedy to those who think; a tragedy to those who feel.
Posted

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.

Life is a comedy to those who think; a tragedy to those who feel.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...