Missing Assembly for System.Collections.Generic?

J

John Smith

using System.Collections.Generic;
using Microsoft.Office.Tools;

When trying to include the above namespaces I got the following error:
The type or namespace name 'Generic' does not exist in the namespace
'System.Collections' (are you missing an assembly reference?)
The type or namespace name 'Tools' does not exist in the namespace
'Microsoft.Office' (are you missing an assembly reference?)

I am running MS Visual Studio .NET 2003 with .NET Framework 1.1 .

Already checked C:\WINDOWS\assembly which is supposed to be my GAC (I
am on Win XP Pro Corporate) but I don't see an assembly by the name of
"Microsoft.Office.Tools".

What version of .NET Framework has System.Collections.Generic (is it
2.0?)? If so please provide some pointers on finding out the latest
version of .NET Framework that is compatible with MS Visual
Studio .NET 2003 and obtaining it.

Also tried the suggestions of the following but to no avail in solving
the error I listed at the beginning of this post.
http://msdn.microsoft.com/en-us/library/aa159923(office.11).aspx

If you can provide the assembly names / versions that are needed and
how to obtain them; or other pointers in solving the error I would
much appreciate. Thanks.
 
T

Tom Shelton

John Smith submitted this idea :
using System.Collections.Generic;
using Microsoft.Office.Tools;

When trying to include the above namespaces I got the following error:
The type or namespace name 'Generic' does not exist in the namespace
'System.Collections' (are you missing an assembly reference?)
The type or namespace name 'Tools' does not exist in the namespace
'Microsoft.Office' (are you missing an assembly reference?)

I am running MS Visual Studio .NET 2003 with .NET Framework 1.1 .

Already checked C:\WINDOWS\assembly which is supposed to be my GAC (I
am on Win XP Pro Corporate) but I don't see an assembly by the name of
"Microsoft.Office.Tools".

What version of .NET Framework has System.Collections.Generic (is it
2.0?)? If so please provide some pointers on finding out the latest
version of .NET Framework that is compatible with MS Visual
Studio .NET 2003 and obtaining it.

Also tried the suggestions of the following but to no avail in solving
the error I listed at the beginning of this post.
http://msdn.microsoft.com/en-us/library/aa159923(office.11).aspx

If you can provide the assembly names / versions that are needed and
how to obtain them; or other pointers in solving the error I would
much appreciate. Thanks.

Generics were introduced with Framework 2.0 - VS2005. Framework 1.1
sp3 is the latest framework compatible with 2003. There maybe some
hacks to geting latter versions to work in 2003 - but, I am unaware of
them. AFIK, you will have to upgrade to at least VS2005 to be able to
make use of System.Collections.Generic. I would suggest moving to
VS2010 - it has the multi-target support added in VS2008. So, you can
develop in the latest IDE but still target the 2.0 and greater
runtimes.
 
T

Tom Shelton

Peter Duniho pretended :
Generics isn't just a compile-time feature. It requires CLR support to work.
So I don't think there's any practical way to target .NET 1.1 and still use
generic types (including those in the System.Collections.Generic namespace).

Your correct - there is no way to target 1.1 and use generics. I was
refering to the possiblity of hacking 2003 to use the 2.0 libraries and
compilers. It seems there used to be talks of such things back in the
day :)

It seems it would be more practicle to upgrade the IDE at this point
though....
 

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