Click to See Complete Forum and Search --> : Type Conflicts, same type in different projects.


benshole
February 13th, 2009, 07:57 AM
I have an app that has a plugin architecture using dlls.
The main application has a type which is also used in the plugin dlls. So the source for this type needs to live in both projects. However if i add the source and try to compile i get.

The type 'Player.data.Event' in "c:\........." conflicts with the imported type 'Player.data.Event' in "c:\blablabla" Using the type defined in bla bla bla etc...

The type is identical in both cases. (Same file!)

How am I best going about enabling this type to be used by both projects so they are able to both understand and pass objects between them?

Many thanks.

Ben

BigEd781
February 13th, 2009, 01:02 PM
Why not make your class public to developers of a plug-in? That way they can use the class and do not need to duplicate it. You could also alias one of them or always use the fully qualified name.

using MyNamespace.Player = MyPlayer;