Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Compiler Warning CS1595

Compiler Warning CS1595

Scheduled Pinned Locked Moved C#
csharpvisual-studiowinformsquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nigel Savidge
    wrote on last edited by
    #1

    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!

    C 1 Reply Last reply
    0
    • N Nigel Savidge

      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!

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      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

      N 1 Reply Last reply
      0
      • C Colin Angus Mackay

        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

        N Offline
        N Offline
        Nigel Savidge
        wrote on last edited by
        #3

        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?

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups