Anonymous Penguin
Anonymous Penguin

Reputation: 2137

Changes in the code or the designer won't update when debugging

I am trying to debug my VB.net app in Visual Studio Express 2010, when I realized my changes will not update on my form-on the designer or in the code. After looking online, I found that you should clear out the "Debug" folder under the bin. That worked-for only one time. Now it went back to the older version and when I delete it again, it doesn't change. When I build the project and run it from the "Release" folder, it works perfectly, but when a error occurs at runtime, it won't show where the error is because it is running independently.

Thanks in advance.

(I have Windows XP SP3)

Upvotes: 1

Views: 27151

Answers (8)

Mr.Turo
Mr.Turo

Reputation: 1

First make sure your Localizable Property of you form is set to FALSE

Localizable prop

Upvotes: 0

slippy
slippy

Reputation: 21

"Save all" works for me in VS 2010 VB, in Debug and Release mode. I put the "Save all" icon next to the Run and Build icons.

Upvotes: 0

whitehand
whitehand

Reputation: 75

I had the same problem. Frustrating problem....? Close the project, go to debug bin/folder, delete these files, reopen project and rebuild it (F5). - .exe - .pdb - .vshost.exe - .vshost.exe.manifest - .xml

it works 99.99%.......thanks

Upvotes: 2

Vid Maddness
Vid Maddness

Reputation: 1

I have the same problem, but i changed the solution config next to the start button from debug to release and that fixed my problem, try it :)

Upvotes: 0

  1. Close VS
  2. Press Ctrl + Alt + Delete
  3. Choose "Task Manager"
  4. In the "Process" tab in "Task Manager" find your "ProjectName.EXE" and click "End Task"
  5. Restart VS

Upvotes: 0

Spyros
Spyros

Reputation: 126

This happened to me as well. I believe the /bin and /obj folders of my application must've been locked for by some other application. Before manually deleting them I tried running Visual Studio as an administrator and did a Clean and a Rebuild which worked. If it doesn't work for you, try deleting the folders manually.

Upvotes: 1

Yatrix
Yatrix

Reputation: 13805

Before I'd create a new project, I'd copy all of the code-behind (including the code that creates the controls that you're not supposed to touch) into another form. That may be all you need to do. Try compiling that form and running it and see if it's good. If so, you won't have to create a whole new project and can just delete the old form.

I would think there's something causing this that would be much easier to to fix. Are there any config files or anything like that? Are you building to the right location?

It's been a while since I've done winforms, but I remember this happening in VS 2005 and I just created a new form and copied the code-behind into another winform and compiled.

Hope this helps.

Upvotes: 1

GameAlchemist
GameAlchemist

Reputation: 19294

mmm... if it was for me, with such a weird bug, i would create a new project then insert the files (not as a link, but a copy) in the project, and i most likely all will work fine after... Faster than finding where-the-hell is that wrong parameter...
So how do you do that ? Well create a new project, choose the folder and name, change namespace in settings if needed, then in project explorer Add existing item, then Browse and select your code and xaml (and other maybe) files. Let us know.

Upvotes: 1

Related Questions