0

Problem

I have a large file that was serialized using BinaryFormatter that I need to create a class for, so that I can serialize similar files.

What I have tried

I came across this answer that explains how to do this manually.

However, the file I have is over 500kB, so this would take a very long time by hand.

Question

Is there a way to automatically get the structure(s) described within the file?

8
  • 1
    You need to use the same classes that were used to serialize. Do you have the original classes? It also may need to be done with same Net/Core version that was used to serialize. Commented Aug 2, 2023 at 20:17
  • I do not have the original classes. I started working through using the answer that I mentioned and was able to get a bit of it loaded. But looking at my progress it will likely take weeks to get through the whole file. Commented Aug 3, 2023 at 11:36
  • See following : github.com/bbowyersmyth/BinaryFormatDataStructure Commented Aug 3, 2023 at 12:13
  • That has helped a lot. However, I am seeing some variables that have forward slashes (/) within the variable name (e.g. Item5/B). This is obviously not possible in C#, and I am having difficulty finding what that could represent. Commented Aug 3, 2023 at 14:51
  • I used xml serializer and got following Item5_x002F_B Commented Aug 3, 2023 at 17:23

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.