Click here to Skip to main content
15,910,083 members
Home / Discussions / C#
   

C#

 
GeneralHowto create a extra Taskbar for a small battery bar Pin
maZeX21-Nov-03 3:27
maZeX21-Nov-03 3:27 
GeneralRe: Howto create a extra Taskbar for a small battery bar Pin
Heath Stewart21-Nov-03 4:26
protectorHeath Stewart21-Nov-03 4:26 
Generalto get the character which mouse pointer focus on Pin
katoya21-Nov-03 3:16
katoya21-Nov-03 3:16 
GeneralHelp with FolderBrowserDialog... Pin
Søren Christensen21-Nov-03 3:16
Søren Christensen21-Nov-03 3:16 
GeneralRe: Help with FolderBrowserDialog... Pin
Heath Stewart21-Nov-03 4:15
protectorHeath Stewart21-Nov-03 4:15 
GeneralCaptureSound a DirectX code sample Pin
thomasa21-Nov-03 3:01
thomasa21-Nov-03 3:01 
GeneralRe: CaptureSound a DirectX code sample Pin
Heath Stewart21-Nov-03 4:22
protectorHeath Stewart21-Nov-03 4:22 
GeneralLets see Heath answer this one then! Pin
Martin Cross20-Nov-03 22:59
Martin Cross20-Nov-03 22:59 
GeneralRe: Lets see Heath answer this one then! Pin
Nick Parker21-Nov-03 3:18
protectorNick Parker21-Nov-03 3:18 
GeneralRe: Lets see Heath answer this one then! Pin
Martin Cross21-Nov-03 3:45
Martin Cross21-Nov-03 3:45 
GeneralRe: Lets see Heath answer this one then! Pin
Heath Stewart21-Nov-03 3:54
protectorHeath Stewart21-Nov-03 3:54 
GeneralRe: Lets see Heath answer this one then! Pin
Martin Cross21-Nov-03 4:31
Martin Cross21-Nov-03 4:31 
QuestionHow to avoid menu on RMouse button Pin
A.Wegierski20-Nov-03 20:38
A.Wegierski20-Nov-03 20:38 
AnswerRe: How to avoid menu on RMouse button Pin
Heath Stewart21-Nov-03 3:58
protectorHeath Stewart21-Nov-03 3:58 
GeneralRe: How to avoid menu on RMouse button Pin
A.Wegierski21-Nov-03 17:44
A.Wegierski21-Nov-03 17:44 
GeneralRe: How to avoid menu on RMouse button Pin
Heath Stewart22-Nov-03 11:14
protectorHeath Stewart22-Nov-03 11:14 
GeneralBlobbing Pin
MitchDG20-Nov-03 20:15
MitchDG20-Nov-03 20:15 
GeneralRe: Blobbing Pin
MitchDG20-Nov-03 21:43
MitchDG20-Nov-03 21:43 
Generalsocket listening error Pin
jtmtv1820-Nov-03 17:21
jtmtv1820-Nov-03 17:21 
GeneralRe: socket listening error Pin
Ronny Andersson21-Nov-03 1:12
Ronny Andersson21-Nov-03 1:12 
GeneralRe: socket listening error Pin
jtmtv1821-Nov-03 8:08
jtmtv1821-Nov-03 8:08 
GeneralRe: socket listening error Pin
Ronny Andersson22-Nov-03 1:41
Ronny Andersson22-Nov-03 1:41 
GeneralRe: socket listening error Pin
jtmtv1822-Nov-03 3:02
jtmtv1822-Nov-03 3:02 
GeneralRe: socket listening error Pin
jtmtv1822-Nov-03 3:10
jtmtv1822-Nov-03 3:10 
QuestionDeserializing in a different assembly... how to? Pin
Carl Mercier20-Nov-03 16:15
Carl Mercier20-Nov-03 16:15 
Hi!

I have 2 different applications/assembly. The first one creates an object and serializes it to a textfile on disk.

The second one has the the exact same class (copied/pasted). It reads the file that is on disk and attempts to deserialize it and create a new object.

The process works fine if I serialize/deserialize in the first application, but it fails when I try to deserialize in the second application. Here's the exception:

Parse Error, no assembly associated with Xml key a1:http://schemas.microsoft.com/clr/nsassem/UI/UI%2C%20Version%3D1.0.1419.30011%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull AdonisConfigDisk

Although it is generally not a good idea to copy/paste code like I did (I should have 1 dll with the code I need), I am forced to do so for some reasons I won't go into right now.

Here's my code... Does anyone have an idea of what I'm doing wrong? How can I strip the assembly information from the serialized object?

<br />
public MemoryStream Serialize()  {<br />
   MemoryStream stream = New MemoryStream();<br />
   SoapFormatter sf = New SoapFormatter(null, New StreamingContext(StreamingContextStates.All));<br />
   sf.Serialize(stream, this);<br />
   stream.Seek(0, 0);<br />
   return stream;<br />
}<br />
<br />
public AdonisConfigDisk Deserialize(MemoryStream ms)  {<br />
   SoapFormatter sf = New SoapFormatter(null, New StreamingContext(StreamingCOntextStates.All));<br />
   return DirectCast(sf.Deserialize(ms), AdonisConfigDisk);<br />
}<br />


Thanks!

Carl

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.