![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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. |
| |||||||
| |
| | #1 (permalink) |
| | 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 Specs![]() |
| | #2 (permalink) |
| | 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 Specs![]() |
| | #3 (permalink) |
| | 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 Specs![]() |
| | #4 (permalink) |
| | 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 Specs![]() |
| | #5 (permalink) |
| | 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 Specs![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Compiling error | .NET General | |||
| Compiling PS1 script to .com or .exe.. | PowerShell | |||