Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Indigo

Vista - DataContract and DataMember not found when compiling

 
 
Old 05-04-2006   #1 (permalink)
WimVH


 
 

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


 
 

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


 
 

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


 
 

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


 
 

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


Similar Threads
Thread Forum
Compiling error .NET General
Compiling PS1 script to .com or .exe.. PowerShell


Vista Forums 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 Ltd

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