开发者

I make changes to a form in design mode but when the program is built the changes are not there?

I am designing a basic 开发者_C百科app with multiple forms I seem to be coming across this problem and it will probably be something stupid.

When I make a change to my main form in design mode (like add a button), the button appears in design mode and I can code it but when I build the program it doesn't show up.

Any ideas?


  • Clean and Rebuild
  • Make sure you're you're starting a correct form in Application.Run in Program.cs

Most Important of all ..

  • Save your changes !


And make sure that the build compiles (it might not compile and not ask you if you want it to run the last successful build).


Check out what Microsoft themselves say:

http://vidmar.net/weblog/archive/2005/02/04/999.aspx


The problem was resolved. Just go to taskbar> build >clean rebuild.


Some questions:

  • If you change the code-behind, does the debugger stop on a breakpoint you put on that change? Also, declare a dummy variable and check if it is visible through the debugger windows such as "Locals", "Autos", "Watch" or "Immediate"?
  • Did you tamper with Form's default constructor (add parameters, change visibility, that sort of things)?
  • The form you are changing - are you positive that it is actually a main form (check the Program.Main)?
  • Does your form include user controls?
  • Did you try restarting the Visual Studio?
  • Did you try a full rebuild?
  • Did you try manually deleting all bin/obj folders then rebuilding?
  • Is your project actually selected for building under current configuration/platform (investigate the Build check-box under Configuration Manager)?
  • Did the project successfully build (check the error log)?
  • Are you running the same configuration/platform that you are building? Are you running the same project that you are building?
    • Ensure the right project is bold in the Solution Manager or check the start-up project in Solution Manager.
    • Do you happen to use "Start external program" under debugging options?

OK, this is not exactly an "answer", but answering these questions may produce some clues as to where is the actual problem...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜