Click here to Skip to main content
15,850,545 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have created a C# dll(Class library application) in visual studio 2005.I need to add this dll in one of my project which is created in visual studio 2003 as reference.But it is showing the error

"A reference to 'xxxx.dll' could not be added. This is not a valid assembly or COM component. Only assemblies with extension 'dll' and COM components can be referenced. Please make sure that the file is accessible, and that it is a valid assembly or COM component."

Please help me

Thanks in advance
Posted
Updated 26-Jul-11 21:43pm
v2
Comments
chemark 28-Jul-11 3:25am    

You can't add later assemblies to an earlier version - it's like trying to open a Office 2012 document in Office 98: It doesn't know the format and can't cope.

Your options are:
1) Rebuild the DLL in VS 2003
2) Move the 2003 project to VS2005 (or better, 2008 or even 2010)
 
Share this answer
 
Comments
kutz 2 27-Jul-11 2:58am    
Ok thanks
Toniyo Jackson 27-Jul-11 3:04am    
Correct. +5
2005 assembly is created in new version,where as 2003 is old version so its not possible to add reference of VS 2005 dll to VS 2003 Similarly,VS 2008 dll cant add to VS 2005 project
 
Share this answer
 
Comments
kutz 2 27-Jul-11 2:58am    
Ok thanks
Storing your past solution in executable (compiled assembly) form makes no sense anyway. If you developed the library, you do have its source code. Add your source code to your solution and migrate it to the version of Visual Studio and project file you're using; so both projects will be in the same solution.

Add reference as a project, not as an executable module ("Projects", not "Browse" in References window).

—SA
 
Share this answer
 

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