Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7775679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:41:42+00:00 2026-06-01T17:41:42+00:00

I have a solution which consists, to put it simply, a Windows Forms Application

  • 0

I have a solution which consists, to put it simply, a Windows Forms Application project and a Class Library, both in C#. My library project was named OldName. Thus the namespace was also OldName and the generated file was OldName.dll.

I wanted to change the name, so I went into Properties, and changed the Assembly Name from OldName to NewName.

Building now generates a NewName.dll. However, the moment my application tries to access this dll, I get a System.Runtime.Serialization.SerializationException (the dll contains my methods for binary-serializing some stuff): It claims that Unable to find assembly 'OldName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.Procmon.exe confirms that it is looking for the old dll (NAME NOT FOUND).

Now the strange thing is, if I copy the NewName.dll and rename it to OldName.dll, so that I have OldName.dll and NewName.dll, the problem persists. If I delete NewName.dll and only leave OldName.dll, the program crashes at launch with: System.IO.FileNotFoundException: Could not load file or assembly 'NewName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. This time, Procmon.exe reports that it failed a CreateFileMapping operation on OldName.dll because FILE LOCKED WITH ONLY READERS, but it seems it gets the same thing on NewName.dll.

Changing the Assembly Name back to OldName fixes everything, but of course then the file name becomes OldName and I don’t want that.

I can’t for the life of me figure out where else it references the old assembly name. What could I be missing?

SOLUTION: My program allows the user to create a file, and then save it to the disk using serialization with the methods in my dll. It also Allows loading the file. Being lazy, I had made a test file once, and kept reusing it. Turns out, as @Tigran suggested, the old Assembly name still appeared inside the serialized data file, so when I attempted to load it from my program I was getting an exception because it couldn’t find the assembly referenced in the serialized file.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T17:41:43+00:00Added an answer on June 1, 2026 at 5:41 pm

    I suppose that in your program you use standart .NET serialization. Remember that in that kind of serialization .NET saves type information too. Complete type information, with namespace. That means if you change assembly name and recompile the complete type name will get mismatch.

    If this is not what you-re doing, please clarify.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My solution consists of two projects: a class library project (named as DataAccess )
I've a solution which consists of a web project and a class library project.
I have an solution in VS 2008 which contains two class library projects and
I have an application which consists of two activities/screens and a java class from
I have a software project which consists of multiple Project files and multiple Solution
I have an ntier solution which has a Domain project for my POCO classes.
I have a Visual Studio solution which is open in both blend 2 SP1
I have a visual studio 2005 solution which has a web application and a
I have a solution First which consists of few projects. One of the projects
I have a project which consists of several services, each in their own SVN

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.