Hi,
I have a Silverlight 4 application where I am making use of shared classes. In the .Web project, I have a class called "X.Shared.cs". This class has three string properties. When I build the application, it gives an error saying "The type 'X' already contains a definition for 'Y'". It seems that the properties in the generated code in the Silverlight Application are being seen as duplicates. I have tried cleaning my solution and rebuilding, this helps every now and then but is totally inconsistent.
Has anyone had experience in this issue? Am I perhaps doing something wrong?
The code for the shared class (X.Shared.cs) is as follows:
public partial class VideoItem
{
[Key]
public String ID
{
get;
set;
}
public String ImageURL
{
get;
set;
}
public String URL
{
get;
set;
}
}
Here is a screenshot of the solution explorer showing the generated shared file: