D
David Jackson
Hello,
My company has a collection of reusable base classes for common functions
like encryption and mail which can be dropped into any Visual Studio
project. Several of these are currently being used on the corporate
intranet.
I have now been asked to create a class library which will contain some
SharePoint functionality. However, this class library also needs to use some
of the reusable base classes.
When I add the class library to the intranet project, set a reference to it
and rebuild, I see lots of warnings like this:
Warning 1 The type 'BaseClasses.CEncryption' in
'C:\Users\David.Jackson\Documents\Visual Studio
2008\Projects\intranet\intranet\code\BaseClasses\Encryption.cs' conflicts
with the imported type 'BaseClasses.CEncryption' in
'C:\Users\David.Jackson\Documents\Visual Studio
2008\Projects\intranet\SharePoint\bin\Debug\SharePoint.CMS.dll'. Using the
type defined in 'C:\Users\David.Jackson\Documents\Visual Studio
2008\Projects\intranet\intranet\code\BaseClasses\Encryption.cs'.
C:\Users\David.Jackson\Documents\Visual Studio
2008\Projects\intranet\intranet\Global.asax.cs 36 42 intranet
I tried removing the using directive in the class library and referring to
the base classes explicitly, but that didn't make any difference.
I also tried a using directive alias in the class library e.g.
using CLBaseClasses = BaseClasses;
but that also didn't make any difference.
I can't change the namespace of the reusable base classes because they are
shared in SourceSafe.
I understand that the above is merely a warning and not a true error, and
everything seems to work correctly, so can I just ignore it? I would prefer
to find a way of eliminating these warnings if possible.
Thank you.
DJ
My company has a collection of reusable base classes for common functions
like encryption and mail which can be dropped into any Visual Studio
project. Several of these are currently being used on the corporate
intranet.
I have now been asked to create a class library which will contain some
SharePoint functionality. However, this class library also needs to use some
of the reusable base classes.
When I add the class library to the intranet project, set a reference to it
and rebuild, I see lots of warnings like this:
Warning 1 The type 'BaseClasses.CEncryption' in
'C:\Users\David.Jackson\Documents\Visual Studio
2008\Projects\intranet\intranet\code\BaseClasses\Encryption.cs' conflicts
with the imported type 'BaseClasses.CEncryption' in
'C:\Users\David.Jackson\Documents\Visual Studio
2008\Projects\intranet\SharePoint\bin\Debug\SharePoint.CMS.dll'. Using the
type defined in 'C:\Users\David.Jackson\Documents\Visual Studio
2008\Projects\intranet\intranet\code\BaseClasses\Encryption.cs'.
C:\Users\David.Jackson\Documents\Visual Studio
2008\Projects\intranet\intranet\Global.asax.cs 36 42 intranet
I tried removing the using directive in the class library and referring to
the base classes explicitly, but that didn't make any difference.
I also tried a using directive alias in the class library e.g.
using CLBaseClasses = BaseClasses;
but that also didn't make any difference.
I can't change the namespace of the reusable base classes because they are
shared in SourceSafe.
I understand that the above is merely a warning and not a true error, and
everything seems to work correctly, so can I just ignore it? I would prefer
to find a way of eliminating these warnings if possible.
Thank you.
DJ