Click here to Skip to main content
15,887,812 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Everyone,
I have merged two two dll A and B, now i want to call my merged dll in a project using
(using merge.dll) but it is giving me an error, any follow on that how can i fix the problem. I have check .net framework version of both dll and the project, but could not use it.

error : The type or namespace Merged could not be found.

how can i call my merged dll in a project kindly help me out.
Best Regrads,
Mohammad Khubaib.

What I have tried:

using Merged;

using Merged;

using Merged;
Posted
Updated 25-Feb-20 20:49pm

1 solution

We have no idea exactly what you have done to "merge two dll A and B" - but unless you put both of A & B in the same namespace (i.e. you changed the namespaces for both of them throughout the source for the Merged.DLL project) you need to add using statements for both namespaces in order to access them, as well as adding a refernec to the Merged.DLL to the target project.
 
Share this answer
 
Comments
Muhammad Khubaib Nasir 26-Feb-20 2:58am    
Dear OriginalGriff, there were two dll like a.dll and b.dll and merger both of them into one using ilmerge, and named it merged.dll now i add the reference of merged.dll in my project but could not import it by typing "using merged.dll", how can i use my merged dll in a project?
OriginalGriff 26-Feb-20 3:12am    
ILMerge doesn't change namespaces: it just repackages existing code into a single assembly file so it's easier to distribute. So it doesn't create a "Merged" namespace and that means that
using Merged;

will not work.
You would need to use the original namespaces from the unmerged code:
using NamespaceFromAdotDLL;
using NamespaceFromBdotDLL;
Muhammad Khubaib Nasir 26-Feb-20 4:34am    
ok
Muhammad Khubaib Nasir 26-Feb-20 4:33am    
ok

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900