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 8518595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:01:21+00:00 2026-06-11T06:01:21+00:00

I have an MyApp.exe.config that contains this: <section name=keys type=MyApp.KeysSection, MyApp /> This works

  • 0

I have an MyApp.exe.config that contains this:

<section name="keys" type="MyApp.KeysSection, MyApp" />

This works as expected. However, when I rename MyApp.exe to MyApp.renamed.exe, and the config file to MyApp.renamed.exe.config, I get an exception : “Could not load file or assembly ‘MyApp’ or one of its dependencies. The system cannot find the file specified”.

Ok, so this must be because the config file is still referencing the MyApp assembly. So I updated it to read :

<section name="keys" type="MyApp.KeysSection, MyApp.renamed" />

When I run the application, I then get a new exception: “The located assembly’s manifest definition does not match the assembly reference”.

I understand what the above message means, but doesn’t this mean that I’m unable to rename my assembly without also generating a new manifest file? Ideally, I’d like to be able to rename my assembly, and have it still work. The reason for this is because the app has various “flavours” and I wanted to use file names such as MyApp.Flavour1.exe, MyApp.Flavour2.exe etc but this won’t work without generating different manifests and configuration files for each flavour, as it is.

What I’m asking, is whether there’s a way to create my assembly such that renaming the file doesn’t cause it to throw this exception.

  • 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-11T06:01:22+00:00Added an answer on June 11, 2026 at 6:01 am

    Unfortunately, you cannot rename an assembly in this way. See Loading renamed C# assembly throws FileNotFoundException for more information.

    Instead, you may want to create different projects that contain the same or similar files or move common files to a separate assembly and have the different “flavor” assemblies reference the common assembly.

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

Sidebar

Related Questions

I have a config file, myapp.exe.config, that I want to install only if it
I have a service that when installed puts the Myapp.exe.config file (generated based of
I have added a config file (myapp.exe.config) that is deployed to the device after
I have an assembly that provides the class structure for a custom config section.
I have a command line application called MyApp.exe, that I want to use like
I have an application MyApp.exe . This app uses an assembly MyAssembly1.dll which itself
I have that string ... C:\Users\ApplicationData\Folder1\Myapp.exe How could i cut like: C:\Users\ApplicationData\Folder1 I have
I have a strange situation in regards to xml serialization... If I run MyApp.exe
I have a C# service that works without any problems on my laptop (Windows 7).
I have a client app that makes calls to a WCF service. This app

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.