Application Manifest Error - Two or more components referenced directly or indirectly by the application manifest have files by the same name.

If you encounter "Two or more components referenced directly or indirectly by the application manifest have files by the same name." when you creating a Application Manifest for Registration Free Installation of dll. This is a ERROR_SXS_DUPLICATE_DLL_NAME error.

Whenever you see this error, this means that your manifest could have a File tags that have duplicate name with your manifest. Below is an example of File tag that point to a Audio.dll




Fixing this issue could be extremely tedious depend on the complexity of your manifest. Some suggestions are

1. Scan through all manifest files via search

This could be the fastest way to find duplicate declaration of file tag with same name

2. Duplicate name appear at application.exe.manifest and your external manifest

Each application will auto generate a application.exe.manifest. For example, if you application has a video.exe, you will have a video.exe.manifest

This manifest is generated during build time and it could link external manifest via app.manifest in your VS IDE environment.

So, this scenarios will happen when your external manifest contain a file tag call and you accidentally set the dll in your IDE build action as Content. This setting tell the compiler to add a dll file tag in application.exe.manifest

To fix this, assuming that your external manifest is valid, you have to change the following at your IDE environment

a. Go to VS Solution explorer, locate your dll. For this example, I am using Audio.dll



b. Change Build Action - Content to None


c. Rebuild all application and your application.exe.manifest should be updated


Comments

  1. Brilliant! Thank you for that! I was going crazy over this error, and was about to start pulling out my remaining hair. Thanks for saving me!

    ReplyDelete

Post a Comment

Popular Posts