 |
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
 | This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|
|

July 2nd, 2008, 06:35 PM
|
|
Authorized User
|
|
Join Date: Jun 2008
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Linq and namespaces System and System.Xml
Hi Imar,
Since this is not an issue directly from your book, don't feel obliged to answer this question. I am only addressing it to you because you always give good answers.
I have been doing some experimenting with some C# code in .cs files and keep getting the following error messages (in response to Control-F5), which seem to be triggered by default "using" statements:
"The type or namespace name 'Linq' does not exist in the namespace 'System' (are you missing an assembly reference?) The type or namespace name 'Linq' does not exist in the namespace 'System.Xml' (are you missing an assembly reference?)"
I am using VWD Express 2008. Do you have any idea what I am doing wrong?
Thank you for your trouble.
Roman
|
|

July 3rd, 2008, 01:08 PM
|
|
Authorized User
|
|
Join Date: Jun 2008
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi Imar,
Thank you for responding to my question.
I have merely been creating some simple classes in .cs files and driver code in the button-click function behind an aspx page that has a text box and a button.
However, it has just occurred to me that a possible explanation for the problem with the namespaces may be that I recently reinstalled VWD, in order to fix a recurrent problem with disappearing website templates. When I did this, a few days ago, I got an error message to the effect that the MSDN library could not be installed. Perhaps the problem is missing libraries. I will try to install the program yet again, and see if that solves the problem.
Thank you again for your help.
Cheers,
Roman
|
|

July 3rd, 2008, 02:21 PM
|
|
Authorized User
|
|
Join Date: Jun 2008
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi again, Imar,
I have just reinstalled VWD Express, but it has made no difference to the problem with the Linq namespaces.
I do not know how to bring up a project's properties dialog. If you could give me a hint, I would appreciate it.
Thank you again for your trouble.
Roman
|
|

July 4th, 2008, 01:55 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
On the Solution Explorer, right-click a project and choose Properties.
Can you tell me what version of Visual Studio you are using and what project type and programming language? The Target Framework drop-down is located at different places depending on these variables.
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
|
|

July 4th, 2008, 08:49 AM
|
|
Authorized User
|
|
Join Date: Jun 2008
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi Imar,
Thank you for your help with this issue.
Your questions have led me, I think, to the answer.
I am using Visual Web Developer 2008 Express Edition. The version of Visual Studio is 9.0.21022.8 RTM and the MS.NET framework version is 3.5.
I typically create an "empty web site." Prompted by your questions, I tried creating an "ASP.NET web site," and that solved the problem!
Thank you again for your trouble.
With best regards,
Roman
|
|

July 4th, 2008, 01:15 PM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
As you discovered, the problem was with the project type you started with. An empty web site contains no references. You could simply add a reference to the required assemblies (System, System.Xml.Linq) and those errors should go away.
-Peter
compiledthoughts.com
|
|
 |