I have a Solution which consists of two projects - the Manager and Viewer. Naturally, both use the same classes, e.g. Manager is used to edit data in SomeItem class instances, while Viewer is used to display it's data.
I have all class definitions in the Manager project. To use them in the Viewer project, I created the same directory hierarchy in the Viewer and linked all classes with build action set to "Compile".
But now I'm getting tons of warnings like this:
The type 'SomeItem' in 'Manager\Classes\SomeItem.class.cs' conflicts with the imported type 'SomeItem' in 'Viewer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'Manager\Classes\SomeItem.class.cs'.
What is the best way to use the same class in two projects while having it in a single file?