Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2008 > C# 2008 aka C# 3.0
| Search | Today's Posts | Mark Forums Read
C# 2008 aka C# 3.0 Discuss the Visual C# 2008 (aka C# 3.0) language
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2008 aka C# 3.0 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
 
Old July 16th, 2009, 08:43 PM
Authorized User
 
Join Date: Feb 2007
Location: Delhi, Delhi, India.
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Default error CS0234: The type or namespace name 'Xml' does not exist in the namespace 'Syste

Hi
I'm in the phase of learning C#. I'm trying to save/retrieve the data in XML file entered on command line by the user. I'm getting the following error during compilation.

error CS0234: The type or namespace name 'Xml' does not exist in the namespace 'System' (are you missing an assembly reference?)

I would appreciate, If you could help me resolve this issue.

Thanks....
 
Old July 16th, 2009, 09:55 PM
Lee Dumond's Avatar
Wrox Author
Points: 4,942, Level: 29
Points: 4,942, Level: 29 Points: 4,942, Level: 29 Points: 4,942, Level: 29
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2008
Location: Decatur, IL, USA.
Posts: 923
Thanks: 12
Thanked 166 Times in 162 Posts
Default

Do you have a reference to System.Xml in the project?
__________________
Visit my blog at http://leedumond.com
Follow me on Twitter: http://twitter.com/LeeDumond

Code:
if (this.PostHelpedYou)
{
   ClickThanksButton(); 
}
 
Old July 17th, 2009, 12:29 PM
Authorized User
 
Join Date: Feb 2007
Location: Delhi, Delhi, India.
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Default

yes, I do have a reference to System.Xml in the project.
In fact, I've added the following references for XML parsing of data

using System.Xml;
using System.Xml.Serialization;

Thanks for your response Lee !
 
Old July 17th, 2009, 12:32 PM
samjudson's Avatar
Friend of Wrox
Points: 8,687, Level: 40
Points: 8,687, Level: 40 Points: 8,687, Level: 40 Points: 8,687, Level: 40
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2007
Location: Newcastle, , United Kingdom.
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

That is not the same as adding a project reference.

Is System.Xml listed under the project references.

If not, right click on the project, choose Add Reference, and add a reference to System.Xml.dll.
__________________
/- Sam Judson : Wrox Technical Editor -/

Think before you post: What have you tried?
The Following User Says Thank You to samjudson For This Useful Post:
 
Old July 17th, 2009, 01:25 PM
Lee Dumond's Avatar
Wrox Author
Points: 4,942, Level: 29
Points: 4,942, Level: 29 Points: 4,942, Level: 29 Points: 4,942, Level: 29
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2008
Location: Decatur, IL, USA.
Posts: 923
Thanks: 12
Thanked 166 Times in 162 Posts
Default

Sam is correct. A using statement is not the same as having an assembly reference in the project.

The error message tells you exactly what to do:

are you missing an assembly reference?

That means you need to reference the assembly.
__________________
Visit my blog at http://leedumond.com
Follow me on Twitter: http://twitter.com/LeeDumond

Code:
if (this.PostHelpedYou)
{
   ClickThanksButton(); 
}
 
Old July 17th, 2009, 02:13 PM
Authorized User
 
Join Date: Feb 2007
Location: Delhi, Delhi, India.
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Thanks a lot Sam, Lee ! That helped.

Appreciate It..
 
Old August 19th, 2009, 07:56 PM
Authorized User
 
Join Date: Feb 2007
Location: Delhi, Delhi, India.
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Default Overwrite the User Input in XML file

Hi
I'm learning to code in C#. I'm writing the code which gets the UserInput from Command line and saves it in the XML file. I'm using XML serialization and Deserialization to get the User input(for e.g. BankAccountNumber,Type,Balance) in XML file. My code overwrites the last user input and doesn't add/increment the last user input as next entry. I guess, I'm missing some enhancement in my code to save/increment each user input in XML file. I would appreciate, If someone could help me to resolve this issue.

Thanks for Your Help !

Regards
 
Old August 19th, 2009, 08:28 PM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

Hi.. Seeing some code will help us help you.
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========
 
Old August 20th, 2009, 03:11 AM
samjudson's Avatar
Friend of Wrox
Points: 8,687, Level: 40
Points: 8,687, Level: 40 Points: 8,687, Level: 40 Points: 8,687, Level: 40
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2007
Location: Newcastle, , United Kingdom.
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

Not posting on the end of an unrelated question would also help.
__________________
/- Sam Judson : Wrox Technical Editor -/

Think before you post: What have you tried?




Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to convert an existing namespace and add new namespace to the SOAP xml Prabeen XSLT 10 April 28th, 2009 10:18 AM
Transforming XML From One Namespace to Another mail4kaja XSLT 1 November 10th, 2008 10:14 AM
xml namespace and asp werD420 XML 1 August 12th, 2005 01:12 PM
Could not load type 'Namespace.PageName'. Bhavin Crystal Reports 0 December 16th, 2004 03:58 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.