Newbie with User Control Problem

Hi I recently built my first user control, a few weeks ago, and all of a sudden today I started having the following problem...

When i make changes to the user control, and hit F5 on my test project, the changes are not appearing (it's as if an old version of my code keeps running). If i publish and run the executable, the changes are there, but if i go back to the designer, my F5 still seems to be latched onto an old control.

I wasn't having a problem until today. I have no idea why this stopped working all of a sudden. The only strange thing I really did today was delete a setup1 project that was in my solution.

I hope someone can help, i have to show my program to a client in the morning and I have a lot of work to do before then.

My current solution has a class named 'Legal' and a test project ("Windows Application) named "LegalTest". Dependencies show Legal as a dependency of LegalTest. I'm creating the new instance of the control with...

Dim ctrl As New Legal.MyControlName

Hopefully someone can help!
Thanks in advance
Davester



Answer this question

Newbie with User Control Problem

  • big3

    I'm not sure... It shows in my solution explorer as MyControlName.vb, but maybe it compiles into a dll

    I created it with the "Add User Control" in vb 2005.

    As per your suggestion, I changed the "Do not copy" to "always copy" and retested, but with the same results


  • TylerWick

    No, it sounds like it's part of the same solution. Is your app actually building, or are you running an old build, because build fails Have you put something blindingly obvious in the control to establish that changes are not being saved Is the file read only



  • Bill Allen

    As well, when I hit "build solution" it says build succeeded.


  • LuisFer

    Is the user control in a dll If so, make sure the dll is being copied in the right place to be imported by the main project.



  • Rolando58640

     

    I think you are onto something!   I went looking for the compiled file and...

    I found legal.dll in my bin\debug directory.  It's time and date stamp is yesterday.  I did find legal.dll in a bin\release directory and it's time/date stamp is a few minutes ago.

    It seems my F5 functionality somehow stopped debugging, and started building as release.

    I'll start trying to find out how to reverse that.  Any ideas would be great!  Thanks for the ideas so far!!!


  • Marc Hanje

    Try deleting the exe, the building it. Just to make sure you're running a new build.



  • panacea911

    Fixed. I will post what little I know about what I did to fix this problem in case someone else comes across this thread who experiences the same problem.

    I raised the version of my class to 1.0.1.0 from 1.0.0.0 and rebuilt. I copied all the files from the bin/release folder into (and overwriting) the bin/debug files.

    Ever since, hitting F5 has worked fine, showing all of my lastest design changes. I also tried changing some other things, hitting F5, and those changes were reflected immediately. Thanks for all your help!


  • Les06291979

    Best guess: you've set the configuration to release, but hitting F5 always builds what's in the debug directory.



  • cc2001a

    To the "blindly obvious changes question", yes, I changed the menu around. The MyControlName.vb file is not read - only and the new menu shows fine in my "published version" and my designer, just not the F5'd program from that same designer.


  • Newbie with User Control Problem