compile error : using system.link

  • Thread starter Thread starter Rainer Queck
  • Start date Start date
R

Rainer Queck

Hello NG,

as a newbie I am learning about asp.net 3.5.
To do this I bought a book form Microsoft Press (ASP.NET 3.5 Step by Step).
Also I prepared me a Windows Server 2008 with IIS 7.0 in a VM to test the
samples from the book.
I have installed the "dotnetfx35.exe" to the WS2008.

My problem now is, that - calling my default.aspx - I receive a errormessage
"CS0234: The Typ- oder Namespacename Linq is not in the Namespace System
available..."
What can I do to solve this problem?

Regards
Rainer Queck
 
Rainer Queck presented the following explanation :
Hello NG,

as a newbie I am learning about asp.net 3.5.
To do this I bought a book form Microsoft Press (ASP.NET 3.5 Step by Step).
Also I prepared me a Windows Server 2008 with IIS 7.0 in a VM to test the
samples from the book.
I have installed the "dotnetfx35.exe" to the WS2008.

My problem now is, that - calling my default.aspx - I receive a errormessage
"CS0234: The Typ- oder Namespacename Linq is not in the Namespace System
available..."
What can I do to solve this problem?

Regards
Rainer Queck

You need to add a "reference" to the project, to System.Core.dll (on
the .Net tab).
A "reference" includes a library in your project, so you can use it's
classes. This is required.
A "using" directive only allows you to skip the namespace when you use
a class from that "used" namespace. This is more like "syntactic
sugar", tit makes it less complicated to write (and read) the code. You
still need the "reference".

Hans Kesting
 
Hello Hans,

Hans Kesting said:
You need to add a "reference" to the project, to System.Core.dll (on the
.Net tab).
A "reference" includes a library in your project, so you can use it's
classes. This is required.
A "using" directive only allows you to skip the namespace when you use a
class from that "used" namespace. This is more like "syntactic sugar", tit
makes it less complicated to write (and read) the code. You still need the
"reference".
Thanks for this infos. What ist the ".Net tab"? Is it part of the
InternetInformationServices?

I in the meanwhile brought my app to be able to run.
In the "book" I was told to copy a different web.config to a existing
(sample) website to add the "authentication" sample.
I remebered that this website worked before and therfor compared the
previous web.congfig to the new one and realized that in the new config the
section
<assemblies> ... </assemblies> was missing, which held the reference.

But back to my previous question, about the .Net tab. Is there a generic way
to enable IIS for .Net 3.5 assemblies?

Regards
Rainer
 
Rainer Queck explained on 17-6-2008 :
Hello Hans,


Thanks for this infos. What ist the ".Net tab"? Is it part of the
InternetInformationServices?

I in the meanwhile brought my app to be able to run.
In the "book" I was told to copy a different web.config to a existing
(sample) website to add the "authentication" sample.
I remebered that this website worked before and therfor compared the previous
web.congfig to the new one and realized that in the new config the section
<assemblies> ... </assemblies> was missing, which held the reference.

But back to my previous question, about the .Net tab. Is there a generic way
to enable IIS for .Net 3.5 assemblies?

Regards
Rainer

No, this is not an IIS setting, you need to set this in Visual Studio.
If you don't have Visual Studio (there are free "express" editions),
then that <assemblies> section works similar.

Hans Kesting
 
Hi Hans,

Hans Kesting said:
No, this is not an IIS setting, you need to set this in Visual Studio.
If you don't have Visual Studio (there are free "express" editions), then
that <assemblies> section works similar.
Ok, now I know what you where talking about. I am working with VS2008
Professional and the .NET tab holds all necessary references.
The "bug" is in the book, which told me to "copy" a web.config not holding
the required references.

Thanks for your help!

Rainer
 
Back
Top