By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,965 Members | 2,055 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,965 IT Pros & Developers. It's quick & easy.

Possible Version Mismatch?

P: n/a
I just upgraded to v1.1 of the framework and VS.Net 2003. I opened up one
of my solutions and rebuilt my project and all went well. I then ran my
project in debug mode. My program runs up fine, but then I try to open up a
file that it typically works with, my program has custom serialization to a
file for work that users do. This has always worked in the past, as I could
open and resave my files with no problems. Now I am unable to open these
files, that I had been working with in the previous .Net for well over 9
months. The error I get on deserialization says: "Possible Version
mismatch. Type System.Collections.Comparer has 1 members, number of members
deserialized is 0." To me this seems like something directly related to the
Framework upgrade, although I'm not sure what the cause is or exactly how to
fix it and some initial searching around has produced nothing. If anybody
has any ideas, they would be greatly appreciated.

TIA

==============
Joe Reazor
Gorbel Inc.
email: joereaATgorbelDOTcom
Jul 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi Joe,

Since you are using a custom serialization, can you offer more information
such as which member in your class will throw the exception when you
deserializing in .NET framework 1.0. the file serialized in .NET framework
1.0.

In addition, can you post the class declaration that you are serializing
and deserializing, so that I can identify your problem.

If the error is caused by version mismatch, you may work around as follows.
1.Let the writer's application run under .NET 1.1. You can either
re-compile the
writer's project in VS.NET2003 or specify the runtime in the configueration
file,
like the following code:
<configuration>
<startup>
<requiredRuntime version="v1.1.4322"/>
</startup>
</configuration>
2. Let the reader's application runs under .NET 1.0, since the binary files
was
generated by the .NET 1.0 applications. You can either re-compile the
reader's
project in VS.NET 2002 or specify the runtime in the configuration file,
like the
following code:
<configuration>
<startup>
<requiredRuntime version="v1.0.3705"/>
</startup>
</configuration>

Please have a try and let me know if this does the work for you.

Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
From: "Joe Reazor" <jo*******@belgor.com>
Subject: Possible Version Mismatch?
Date: Mon, 18 Aug 2003 09:16:05 -0400
Lines: 22
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Message-ID: <O0**************@TK2MSFTNGP10.phx.gbl>
Newsgroups: microsoft.public.dotnet.general
NNTP-Posting-Host: smtp.gorbel.com 216.42.134.6
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP10.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:104885
X-Tomcat-NG: microsoft.public.dotnet.general

I just upgraded to v1.1 of the framework and VS.Net 2003. I opened up one
of my solutions and rebuilt my project and all went well. I then ran my
project in debug mode. My program runs up fine, but then I try to open up afile that it typically works with, my program has custom serialization to a
file for work that users do. This has always worked in the past, as I couldopen and resave my files with no problems. Now I am unable to open these
files, that I had been working with in the previous .Net for well over 9
months. The error I get on deserialization says: "Possible Version
mismatch. Type System.Collections.Comparer has 1 members, number of membersdeserialized is 0." To me this seems like something directly related to theFramework upgrade, although I'm not sure what the cause is or exactly how tofix it and some initial searching around has produced nothing. If anybody
has any ideas, they would be greatly appreciated.

TIA

==============
Joe Reazor
Gorbel Inc.
email: joereaATgorbelDOTcom

Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 19 '05 #2

P: n/a
Thanks for the response. I had posted this in the framework newsgroup too
since I hadn't had a response here, and got one there much quicker. I did
determine the cause was the SortedList framework object which apparently has
a bug. I discovered a workaround which is to use a SurrogateSelector, but
hopefully MS comes out with a fix too.
==============
Joe Reazor
Gorbel Inc.
email: joereaATgorbelDOTcom
"Peter Huang [MSFT]" <v-******@online.microsoft.com> wrote in message
news:33**************@cpmsftngxa06.phx.gbl...
Hi Joe,

Since you are using a custom serialization, can you offer more information
such as which member in your class will throw the exception when you
deserializing in .NET framework 1.0. the file serialized in .NET framework
1.0.

In addition, can you post the class declaration that you are serializing
and deserializing, so that I can identify your problem.

If the error is caused by version mismatch, you may work around as follows. 1.Let the writer's application run under .NET 1.1. You can either
re-compile the
writer's project in VS.NET2003 or specify the runtime in the configueration file,
like the following code:
<configuration>
<startup>
<requiredRuntime version="v1.1.4322"/>
</startup>
</configuration>
2. Let the reader's application runs under .NET 1.0, since the binary files was
generated by the .NET 1.0 applications. You can either re-compile the
reader's
project in VS.NET 2002 or specify the runtime in the configuration file,
like the
following code:
<configuration>
<startup>
<requiredRuntime version="v1.0.3705"/>
</startup>
</configuration>

Please have a try and let me know if this does the work for you.

Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
From: "Joe Reazor" <jo*******@belgor.com>
Subject: Possible Version Mismatch?
Date: Mon, 18 Aug 2003 09:16:05 -0400
Lines: 22
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Message-ID: <O0**************@TK2MSFTNGP10.phx.gbl>
Newsgroups: microsoft.public.dotnet.general
NNTP-Posting-Host: smtp.gorbel.com 216.42.134.6
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP10.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:104885
X-Tomcat-NG: microsoft.public.dotnet.general

I just upgraded to v1.1 of the framework and VS.Net 2003. I opened up oneof my solutions and rebuilt my project and all went well. I then ran my
project in debug mode. My program runs up fine, but then I try to open up
a
file that it typically works with, my program has custom serialization to

afile for work that users do. This has always worked in the past, as I

could
open and resave my files with no problems. Now I am unable to open these
files, that I had been working with in the previous .Net for well over 9
months. The error I get on deserialization says: "Possible Version
mismatch. Type System.Collections.Comparer has 1 members, number of

members
deserialized is 0." To me this seems like something directly related to

the
Framework upgrade, although I'm not sure what the cause is or exactly how

to
fix it and some initial searching around has produced nothing. If anybodyhas any ideas, they would be greatly appreciated.

TIA

==============
Joe Reazor
Gorbel Inc.
email: joereaATgorbelDOTcom

Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.