-1

I am working in C# with Visual Studio 2017. I had previously made some changes to my form, and today when I run the code, the changes don't show up. It appears to be running an older version. Note that when I originally made the changes, it ran fine with the dropdown working.

Here is the edited version:

Edited Version

And here is what it looks like when it runs:

Running version

I have restarted VS and restarted my computer, both to no avail. I have searched extensively and can't find the answer.

Is there some setting I accidentally hit? Please tell me it's something obvious and not a weird glitch in the VS matrix.

Thanks!

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
DanG
  • 306
  • 7
  • 15
  • ok, i just clicked on the dropdown in designer, and now it runs fine. What the heck? Still seems an answer might help the community. – DanG Sep 18 '19 at 05:00
  • It helps to perform a "Clean" and/or a "Rebuild" in those cases. – Stefan Sep 18 '19 at 05:45
  • @stefan how do i do a Clean or Rebuild? Sorry if this is too basic... – DanG Sep 18 '19 at 21:14
  • In Visual Studio open the 'Build' menu in the menu bar. You see from the top down the following: "Build solution", "Rebuild solution", "Clean solution", etc. – Stefan Sep 19 '19 at 05:42

1 Answers1

0

You were using an old DLL/EXE.

This can happen in a few scenarios, typically if you store your binaries (DLLs built with your project) in source control.

You'd be surprised how many developers get caught out with this. It's often due to being pedantic about EVERYTHING being in source control - including the items you build!

Best thing to do is delete the bin and obj folders from source control. If it's a new project it's often easier to start fresh with a new source control project.

GAC'ing your DLLs is another common cause of this situation.

Jeremy Thompson
  • 61,933
  • 36
  • 195
  • 321