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. C# Project corrupted?

C# Project corrupted?

Scheduled Pinned Locked Moved C#
questioncsharpdatabasevisual-studiodesign
8 Posts 4 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.
  • V Offline
    V Offline
    Vikas K
    wrote on last edited by
    #1

    Hi, Sorry, If I have posted this query to a wrong group! I'm facing an issue with C# project. I use VS 2005 express edition. I was developing a C# project and had couple of UI controls that I had placed using UI editor. Everything was fine but now I can't view the "UI designer" now. If I run the project I do get the UI that I had designed but cant edit it now? How can I see the disigner again? Thanks Vikas

    T 1 Reply Last reply
    0
    • V Vikas K

      Hi, Sorry, If I have posted this query to a wrong group! I'm facing an issue with C# project. I use VS 2005 express edition. I was developing a C# project and had couple of UI controls that I had placed using UI editor. Everything was fine but now I can't view the "UI designer" now. If I run the project I do get the UI that I had designed but cant edit it now? How can I see the disigner again? Thanks Vikas

      T Offline
      T Offline
      T EDY
      wrote on last edited by
      #2

      Hi, Try to close the form and Rebuild Solution..and if the rebuild has succeeded..try to open your form again,sometimes i get the same problem but when i do that my UI designer can be view again Kind Regards, Tomi

      V 1 Reply Last reply
      0
      • T T EDY

        Hi, Try to close the form and Rebuild Solution..and if the rebuild has succeeded..try to open your form again,sometimes i get the same problem but when i do that my UI designer can be view again Kind Regards, Tomi

        V Offline
        V Offline
        Vikas K
        wrote on last edited by
        #3

        I tried but still I can't see the form design! I guess, I will have to port the entire code into a new project now :((

        D M 2 Replies Last reply
        0
        • V Vikas K

          I tried but still I can't see the form design! I guess, I will have to port the entire code into a new project now :((

          D Offline
          D Offline
          Developer611
          wrote on last edited by
          #4

          Hi there . I think , it's better to check your reference files. Maybe you missed one of your reference . if it is , remove you reference from reference list and add it to your project reference again , and then Rebuild your solution or project , what ever as you want . :) :rose:

          DMASTER

          1 Reply Last reply
          0
          • V Vikas K

            I tried but still I can't see the form design! I guess, I will have to port the entire code into a new project now :((

            M Offline
            M Offline
            Martin 0
            wrote on last edited by
            #5

            Hello, What you can try: In your project explorer, rightclick the Form or usercontrol you can not edit and change the "buildaction" to an other setting and then back to "compile" (I have not the english version and only 2003 so I don't know the exact names). Then make a rebuild. Hope it helps!

            All the best, Martin

            V 1 Reply Last reply
            0
            • M Martin 0

              Hello, What you can try: In your project explorer, rightclick the Form or usercontrol you can not edit and change the "buildaction" to an other setting and then back to "compile" (I have not the english version and only 2003 so I don't know the exact names). Then make a rebuild. Hope it helps!

              All the best, Martin

              V Offline
              V Offline
              Vikas K
              wrote on last edited by
              #6

              Hi, Ok I know why this is happening but pls tell me whats wrong in doing this? 1. My form is like this: Everything is proper and I can view the designer //file Form1.cs public partial class Form1 : Form { // many functions/events related to UI controls are here } 2. I need to have a special control class say MyPictureBox derived from PictureBox so added the code as follows in file Form1.cs: //file Form1.cs public class MyPictureBox : System.Windows.Forms.PictureBox { // some special code will be put here } public partial class Form1 : Form { // many functions/events related to UI controls are here } Thats it: Now If I try to open the designer I get the error: One or more errors encountered while loading the designer. The errors are listed below. Some errors can be fixed by rebuilding your project, while others may require code changes. The service System.Windows.Forms.Design.ISelectionUIService already exists in the service container. Parameter name: serviceType Hide at System.ComponentModel.Design.ServiceContainer.AddService(Type serviceType, Object serviceInstance, Boolean promote) at System.ComponentModel.Design.ServiceContainer.AddService(Type serviceType, Object serviceInstance) at System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IServiceContainer.AddService(Type serviceType, Object serviceInstance) at System.Windows.Forms.Design.ComponentDocumentDesigner.Initialize(IComponent component) at System.ComponentModel.Design.DesignerHost.AddToContainerPostProcess(IComponent component, String name, IContainer containerToAddTo) at System.ComponentModel.Design.DesignerHost.Add(IComponent component, String name) at System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(Type componentType, String name) at System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer) at System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer) at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration) at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)

              M 1 Reply Last reply
              0
              • V Vikas K

                Hi, Ok I know why this is happening but pls tell me whats wrong in doing this? 1. My form is like this: Everything is proper and I can view the designer //file Form1.cs public partial class Form1 : Form { // many functions/events related to UI controls are here } 2. I need to have a special control class say MyPictureBox derived from PictureBox so added the code as follows in file Form1.cs: //file Form1.cs public class MyPictureBox : System.Windows.Forms.PictureBox { // some special code will be put here } public partial class Form1 : Form { // many functions/events related to UI controls are here } Thats it: Now If I try to open the designer I get the error: One or more errors encountered while loading the designer. The errors are listed below. Some errors can be fixed by rebuilding your project, while others may require code changes. The service System.Windows.Forms.Design.ISelectionUIService already exists in the service container. Parameter name: serviceType Hide at System.ComponentModel.Design.ServiceContainer.AddService(Type serviceType, Object serviceInstance, Boolean promote) at System.ComponentModel.Design.ServiceContainer.AddService(Type serviceType, Object serviceInstance) at System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IServiceContainer.AddService(Type serviceType, Object serviceInstance) at System.Windows.Forms.Design.ComponentDocumentDesigner.Initialize(IComponent component) at System.ComponentModel.Design.DesignerHost.AddToContainerPostProcess(IComponent component, String name, IContainer containerToAddTo) at System.ComponentModel.Design.DesignerHost.Add(IComponent component, String name) at System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(Type componentType, String name) at System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer) at System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer) at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration) at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)

                M Offline
                M Offline
                Martin 0
                wrote on last edited by
                #7

                Hello, The Problem is that both classes have design support. It is not good practice to but them all in one file. If you put the picturebox in a special file you will also be able to open it over the designer.

                All the best, Martin

                V 1 Reply Last reply
                0
                • M Martin 0

                  Hello, The Problem is that both classes have design support. It is not good practice to but them all in one file. If you put the picturebox in a special file you will also be able to open it over the designer.

                  All the best, Martin

                  V Offline
                  V Offline
                  Vikas K
                  wrote on last edited by
                  #8

                  Thank you Martin and others who gave quick answers! I created another file and things are pretty nice now! Help is really appreciated :)

                  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