Compiler Warning CS1595
-
I have the following compiler warning: CS1595: 'type' is defined in multiple places; using definition from 'assembly' There is a good reason for the warning - I have the type defined in multiple places! What should I do about it? Oh - The reason for having it in multiple places is that I have a windows forms control which shares a type (enum in this case) with another control located in a seperate assembly. The type is used for one of the properties in both controls. Everything works fine except that the Visual Studio 2003 designer forgets the value of the property when loading the control back into the designer unless the type is defined in the controls local assembly - hence I have a duplicate definition since I need it in both controls local assemblys!
-
I have the following compiler warning: CS1595: 'type' is defined in multiple places; using definition from 'assembly' There is a good reason for the warning - I have the type defined in multiple places! What should I do about it? Oh - The reason for having it in multiple places is that I have a windows forms control which shares a type (enum in this case) with another control located in a seperate assembly. The type is used for one of the properties in both controls. Everything works fine except that the Visual Studio 2003 designer forgets the value of the property when loading the control back into the designer unless the type is defined in the controls local assembly - hence I have a duplicate definition since I need it in both controls local assemblys!
Create a third assembly that contains the common stuff and have each of your existing assemblies references it. That way you only define stuff once.
My: Blog | Photos WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
-
Create a third assembly that contains the common stuff and have each of your existing assemblies references it. That way you only define stuff once.
My: Blog | Photos WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
Thanks, but that is exactly what I had until I found that the Visual Studio 2003 designer was failing to restore the state of my enum properties. There appears to be a bug in the Visual Studio 2003 designer?