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. Visual Studio
  4. Visual Studio 2005 designer errors

Visual Studio 2005 designer errors

Scheduled Pinned Locked Moved Visual Studio
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.
  • E Offline
    E Offline
    eggsovereasy
    wrote on last edited by
    #1

    I have a C# Winforms application that I am developing. Yesterday visual studio started giving me errors when I try to load it in the designer, but the project builds fine and runs fine. I get: The variable 'cibInfo' is either undeclared or was never assigned. The variable 'abAddress' is either undeclared or was never assigned. and two: The ConnectionString property has not been initialized. This project was working fine, the VS hiccuped and I haven't been able to load this form since? I have tried getting the project again from source safe, doing a clean then rebuild, restart VS, restart my PC. I'm kind of at a loss on what to do here? EDIT: both cibInfo and abAddress are user controls I created btw.

    T E 2 Replies Last reply
    0
    • E eggsovereasy

      I have a C# Winforms application that I am developing. Yesterday visual studio started giving me errors when I try to load it in the designer, but the project builds fine and runs fine. I get: The variable 'cibInfo' is either undeclared or was never assigned. The variable 'abAddress' is either undeclared or was never assigned. and two: The ConnectionString property has not been initialized. This project was working fine, the VS hiccuped and I haven't been able to load this form since? I have tried getting the project again from source safe, doing a clean then rebuild, restart VS, restart my PC. I'm kind of at a loss on what to do here? EDIT: both cibInfo and abAddress are user controls I created btw.

      T Offline
      T Offline
      Thomas Stockwell
      wrote on last edited by
      #2

      At times, I have problems similar to the first two when I am using a third party library. When it happened I either built the solution and closed/re-opened the document; if that doesn't work then I would shutdown visual studio and restart windows. In some drastic cases, I had to go into the designer code-behind file and remove mention of the selected controls and re-add them to the form

      Regards, Thomas Stockwell Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. Visit my homepage Oracle Studios Discounted or Free Software for Students: DreamSpark - downloads.channel8.msdn.com MSDN Academic Alliance - www.msdnaa.com

      1 Reply Last reply
      0
      • E eggsovereasy

        I have a C# Winforms application that I am developing. Yesterday visual studio started giving me errors when I try to load it in the designer, but the project builds fine and runs fine. I get: The variable 'cibInfo' is either undeclared or was never assigned. The variable 'abAddress' is either undeclared or was never assigned. and two: The ConnectionString property has not been initialized. This project was working fine, the VS hiccuped and I haven't been able to load this form since? I have tried getting the project again from source safe, doing a clean then rebuild, restart VS, restart my PC. I'm kind of at a loss on what to do here? EDIT: both cibInfo and abAddress are user controls I created btw.

        E Offline
        E Offline
        eggsovereasy
        wrote on last edited by
        #3

        I figured out the problem and have a workaround in place... When the designer runs the constructor on my user controls there is a custom combo box on each that fills itself from the database. When I open it in the designer when it trys to fill the combo box it can't find the connection so it chokes trying to get it from app.config. The combobox and usercontrol are in a namespace and project with windows controls that are used in several applications. The form is in a project for the application I have a static class that loads settings from app.config (in order to lower the ammount of string literals strewn about my code) in a project and namespace that has a bunch of business logic classes and the sort. I figured that the designer was having trouble finding the connection string because of all the different projects, so I copied app.config to each project, but that didn't change anything. Long story short, in my static class (AppSettings) I check to see if the connection string is null, if it is then I hard coded the connection string to the dev database and return that (see below). It's lame, but I don't know what else to do. public static string ConnectionString {   get   {     ConnectionStringSettings csSettings = ConfigurationManager.ConnectionStrings["Default"];     if (csSettings == null)       return "<dev connection string here>";     return csSettings.ConnectionString;   } }

        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