Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Indigo

DataContract and DataMember not found when compiling

Update your Vista Drivers Update Your Drivers Now!!
 
 
Thread Tools Display Modes
Old 05-04-2006   #1 (permalink)
WimVH
Guest


 

DataContract and DataMember not found when compiling

Hi,

I use the Feb CTP of WinFx and doing some experiments with WCF. When trying
to make a datacontract a always get the errors "The type or namespace name
'DataMember' could not be found..." and "The type or namespace name
'DataContract' could not be found...". I first saw in the MSDN documentation
I had to include System.Runtime.Serialization, where these attributes are
defined, but that didn't change a thing. Can anybody help? Below the code of
the class

Thx in advance

Wim

using System;
using System.Collections.Generic;
using System.ServiceModel;
using System.Runtime.Serialization;
using System.Text;

....

[DataContract()]
class FUser
{
private string m_strUserName;

[DataMember()]
public string UserName
{
get { return m_strUserName; }
set { m_strUserName = value; }
}
}

My System SpecsSystem Spec
Old 05-04-2006   #2 (permalink)
MSDN
Guest


 

Re: DataContract and DataMember not found when compiling

Used you code and I don't get the error at all
???
SA


"WimVH" <WimVH@discussions.microsoft.com> wrote in message
news:5ADA0D48-D415-4D03-9581-E4E4BE327505@microsoft.com...
> Hi,
>
> I use the Feb CTP of WinFx and doing some experiments with WCF. When
> trying
> to make a datacontract a always get the errors "The type or namespace name
> 'DataMember' could not be found..." and "The type or namespace name
> 'DataContract' could not be found...". I first saw in the MSDN
> documentation
> I had to include System.Runtime.Serialization, where these attributes are
> defined, but that didn't change a thing. Can anybody help? Below the code
> of
> the class
>
> Thx in advance
>
> Wim
>
> using System;
> using System.Collections.Generic;
> using System.ServiceModel;
> using System.Runtime.Serialization;
> using System.Text;
>
> ...
>
> [DataContract()]
> class FUser
> {
> private string m_strUserName;
>
> [DataMember()]
> public string UserName
> {
> get { return m_strUserName; }
> set { m_strUserName = value; }
> }
> }



My System SpecsSystem Spec
Old 05-05-2006   #3 (permalink)
WimVH
Guest


 

Re: DataContract and DataMember not found when compiling

Tried again this morning... still doesn't compile. What must I provide to
"you" in order to help me (whole project, screenshots, settings,..) just ask
and I'll send it over or post it. I really would like to solve this strange
problem.

"MSDN" wrote:

> Used you code and I don't get the error at all
> ???
> SA
>
>
> "WimVH" <WimVH@discussions.microsoft.com> wrote in message
> news:5ADA0D48-D415-4D03-9581-E4E4BE327505@microsoft.com...
> > Hi,
> >
> > I use the Feb CTP of WinFx and doing some experiments with WCF. When
> > trying
> > to make a datacontract a always get the errors "The type or namespace name
> > 'DataMember' could not be found..." and "The type or namespace name
> > 'DataContract' could not be found...". I first saw in the MSDN
> > documentation
> > I had to include System.Runtime.Serialization, where these attributes are
> > defined, but that didn't change a thing. Can anybody help? Below the code
> > of
> > the class
> >
> > Thx in advance
> >
> > Wim
> >
> > using System;
> > using System.Collections.Generic;
> > using System.ServiceModel;
> > using System.Runtime.Serialization;
> > using System.Text;
> >
> > ...
> >
> > [DataContract()]
> > class FUser
> > {
> > private string m_strUserName;
> >
> > [DataMember()]
> > public string UserName
> > {
> > get { return m_strUserName; }
> > set { m_strUserName = value; }
> > }
> > }

>
>
>

My System SpecsSystem Spec
Old 05-08-2006   #4 (permalink)
MSDN
Guest


 

Re: DataContract and DataMember not found when compiling

Hi,

You know your project better than anyone.
Just send the relevant info only.
If the project is not too big then send it zipped.

SA

"WimVH" <WimVH@discussions.microsoft.com> wrote in message
news:EFAB8AEB-D7CB-44E0-BCF3-01D367954E70@microsoft.com...
> Tried again this morning... still doesn't compile. What must I provide to
> "you" in order to help me (whole project, screenshots, settings,..) just
> ask
> and I'll send it over or post it. I really would like to solve this
> strange
> problem.
>
> "MSDN" wrote:
>
>> Used you code and I don't get the error at all
>> ???
>> SA
>>
>>
>> "WimVH" <WimVH@discussions.microsoft.com> wrote in message
>> news:5ADA0D48-D415-4D03-9581-E4E4BE327505@microsoft.com...
>> > Hi,
>> >
>> > I use the Feb CTP of WinFx and doing some experiments with WCF. When
>> > trying
>> > to make a datacontract a always get the errors "The type or namespace
>> > name
>> > 'DataMember' could not be found..." and "The type or namespace name
>> > 'DataContract' could not be found...". I first saw in the MSDN
>> > documentation
>> > I had to include System.Runtime.Serialization, where these attributes
>> > are
>> > defined, but that didn't change a thing. Can anybody help? Below the
>> > code
>> > of
>> > the class
>> >
>> > Thx in advance
>> >
>> > Wim
>> >
>> > using System;
>> > using System.Collections.Generic;
>> > using System.ServiceModel;
>> > using System.Runtime.Serialization;
>> > using System.Text;
>> >
>> > ...
>> >
>> > [DataContract()]
>> > class FUser
>> > {
>> > private string m_strUserName;
>> >
>> > [DataMember()]
>> > public string UserName
>> > {
>> > get { return m_strUserName; }
>> > set { m_strUserName = value; }
>> > }
>> > }

>>
>>
>>



My System SpecsSystem Spec
Old 05-09-2006   #5 (permalink)
WimVH
Guest


 

Re: DataContract and DataMember not found when compiling

Found te problem in the mean time. Silly mistake of me with the references,
sorry to have wasted your time.

"MSDN" wrote:

> Hi,
>
> You know your project better than anyone.
> Just send the relevant info only.
> If the project is not too big then send it zipped.
>
> SA
>
> "WimVH" <WimVH@discussions.microsoft.com> wrote in message
> news:EFAB8AEB-D7CB-44E0-BCF3-01D367954E70@microsoft.com...
> > Tried again this morning... still doesn't compile. What must I provide to
> > "you" in order to help me (whole project, screenshots, settings,..) just
> > ask
> > and I'll send it over or post it. I really would like to solve this
> > strange
> > problem.
> >
> > "MSDN" wrote:
> >
> >> Used you code and I don't get the error at all
> >> ???
> >> SA
> >>
> >>
> >> "WimVH" <WimVH@discussions.microsoft.com> wrote in message
> >> news:5ADA0D48-D415-4D03-9581-E4E4BE327505@microsoft.com...
> >> > Hi,
> >> >
> >> > I use the Feb CTP of WinFx and doing some experiments with WCF. When
> >> > trying
> >> > to make a datacontract a always get the errors "The type or namespace
> >> > name
> >> > 'DataMember' could not be found..." and "The type or namespace name
> >> > 'DataContract' could not be found...". I first saw in the MSDN
> >> > documentation
> >> > I had to include System.Runtime.Serialization, where these attributes
> >> > are
> >> > defined, but that didn't change a thing. Can anybody help? Below the
> >> > code
> >> > of
> >> > the class
> >> >
> >> > Thx in advance
> >> >
> >> > Wim
> >> >
> >> > using System;
> >> > using System.Collections.Generic;
> >> > using System.ServiceModel;
> >> > using System.Runtime.Serialization;
> >> > using System.Text;
> >> >
> >> > ...
> >> >
> >> > [DataContract()]
> >> > class FUser
> >> > {
> >> > private string m_strUserName;
> >> >
> >> > [DataMember()]
> >> > public string UserName
> >> > {
> >> > get { return m_strUserName; }
> >> > set { m_strUserName = value; }
> >> > }
> >> > }
> >>
> >>
> >>

>
>
>

My System SpecsSystem Spec
 

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling PS1 script to .com or .exe.. JMinahan PowerShell 11 05-28-2007 10:58 PM
RE: EventTriggers not compiling.. Wolf Schmidt [MSFT] Avalon 0 01-10-2006 03:52 PM


Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51