Not a valid assembly (Add Reference failure)

G

Guest

When trying to add a reference to a DLL (made with VS2005TS) to a VS2003
project, I receive the following error popup: A reference to
'assemblyname.exe' 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.

I have tried Googling for a solution, and I did find an MSDN page
(http://support.microsoft.com/default.aspx?scid=kb;en-us;821631#appliesto)
that talked about it, but haven't been successful in finding useful info.

One interesting clue as to the problem is that under Selected Components
(inside the VS2003 Add Reference dialog), the Type is listed as "File", not
".Net". Also, I can successfully add the DLL as a reference to the DLL's own
VS2005TS project, just not to VS2003.

Thanks for any wisdom you can impart.

Troy
 
M

Mattias Sjögren

When trying to add a reference to a DLL (made with VS2005TS) to a VS2003

That's simply not possible. VS2003 is tightly integrated with v1.1 of
the CLR which can't load assemblies compiled for v2.0.


Mattias
 
G

Guest

That's simply not possible. VS2003 is tightly integrated with v1.1 of
the CLR which can't load assemblies compiled for v2.0.

If I understand you correctly, the popup error message (within VS2003) is
actually wrong: the DLL may well be a valid assembly file, it's just not
compatible with .Net 1.1. Correct?

If that is the case it bewilders me as to why VS2003 doesn't just tell me it
can't reference a .Net DLL that is greater than .Net 1.x. Even my Jethro
brain could easily comprehend that message.

Does that mean that VS2003 can't be used to build .Net 2.0 projects? If so,
that's beyond words.

Anyway, thanks for your timely assistance.
 
M

Mattias Sjögren

If I understand you correctly, the popup error message (within VS2003) is
actually wrong: the DLL may well be a valid assembly file, it's just not
compatible with .Net 1.1. Correct?
Exactly.


Does that mean that VS2003 can't be used to build .Net 2.0 projects? If so,
that's beyond words.

Correct, you need VS2005 for that.


Mattias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top