473,320 Members | 2,110 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

File Versions

I have a strong named Windows Form application that save and opens files
using a BinaryFormatter. The formatter is set to
FormatterAssemblyStyle.Simple and I use the IFormatter interface to
serialize and deserialize the stream.

The problem comes when I need to change the structure of the object that is
serialized. Thereafter, I need to devise a way to open the old document
formats and convert them to the new format.

I can do that, but I need a way to determine what version of file I'm
opening so that I can use the proper deserialze object. Is there a way to
access the assembly version a binary streaming file was created with? Or,
alternatively, is the a versioning number that can be saved with this type
of file that can be used for that purpose at a later date?

Thanks,

Dennis
Nov 15 '05 #1
2 1096

Hi Dennis,

I think you may override the default serialization, and add some version
information to the front of the serialized file.
In the deserialization, first read the version information your serialized
to determine whether this file was you wanted version.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 15 '05 #2
Thank you!

I also figured out that I can deserialize to an object and then get the type
information about the object (which includes assembly information) and then
decide which object was deserialized.

Dennis

""Jeffrey Tan[MSFT]"" <v-*****@online.microsoft.com> wrote in message
news:2z****************@cpmsftngxa07.phx.gbl...

Hi Dennis,

I think you may override the default serialization, and add some version
information to the front of the serialized file.
In the deserialization, first read the version information your serialized
to determine whether this file was you wanted version.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Xah Lee | last post by:
Just bumped into another irresponsibility in perl. the crime in question this time is the module File::Basename. Reproduction: 1. create a directory containing a file of this name:...
1
by: Jeff | last post by:
Does anyone know of a python module to read a SAS Transport (XPORT) file?
7
by: priya.tweety | last post by:
How to call a js file from another js file?
4
by: Josh Carlisle | last post by:
I've been tasked with developing a document/file versioning system of sorts. Similar to a very scaled down source control system. We're integrating it very closely with an existing application so...
5
by: Laurence | last post by:
In VS.2005 using VB.NET There are two versions on every project, The Assembly Version and the File Version. Why are there two different versions? As far as I can tell, there is not need for...
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting"...
3
bvdet
by: bvdet | last post by:
I wrote a script that extracts line and circle data from an Autocad DXF file:## GridDXF.py Version 1.02 ## Copyright (c) 2006 Bruce Vaughan, BV Detailing & Design, Inc. ## All rights reserved....
17
by: NeoAlchemy | last post by:
I am starting to find more web pages that are using a query parameters after the JavaScript file. Example can be found at www.opensourcefood.com. Within the source you'll see: <script...
12
by: ibloom | last post by:
I've been trying for a couple days to build a program using pyObjC on a mac, I'm stuck on this error: <string>: inconsistent use of tabs and spaces in indentation Traceback (most recent call...
3
by: cckramer | last post by:
Hi, I have a file which has contents like this : Indicators : for issues with indicators contact a@x.com for access to indicators contact b@x.com
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.