By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,569 Members | 1,394 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,569 IT Pros & Developers. It's quick & easy.

ASP.NET with visual studios 2010 problem with editing while debugging

P: 7
I upgraded to visual studios 2010 last week. I also migrated a large web application over that I was working on.

I ran into a huge issue with CodeFile and CodeBehind. I ran the "convert to web application" feature for the project which included designer.vb files and required me to go though can change CodeFile to CodeBehind.

Now everything IS working within the web application after 40ish hours of fixing everything, but now the ability to edit .aspx.vb files while debugging is no longer available. I can edit the .aspx files just fine while debugging but not the codebehind files.

I have tried all the suggestions I have found online and none of these work. What DOES work is changing CodeBehind to CodeFile. Once I do this I can edit while debugging no problem. BUT doing this breaks the pages because the designer.vb file is no longer updated or used.

Does anyone know what could be causing this?

More details:
ASP.net using VB
Visual studios 2010 .net 4.0
x86 machine with debugging set to x86.
project is set to debug (not release)
Various settings are checked ie no optimization, etc


Summary: Can't edit while debugging if referecing file by CodeBehind=filename.aspx.vb. Changeing to CodeFile=filename.aspx.vb allows editing of ASPX.VB files but causes the file to no longer use designer.vb file.
Jun 14 '10 #1
Share this Question
Share on Google+
4 Replies


Frinavale
Expert Mod 5K+
P: 9,731
I've never been able to edit while debugging an ASP.NET application....

-Frinny
Jun 14 '10 #2

P: 7
I was able to with 2005 no problem. But this was when the site was just a website and not a web application. Once I converted the site to a web application (and this adding the designer.vb files) it would no longer allow editing aspx.vb files, but editing the .aspx file (HTML,JS,CSS,Images,Etc).

From my understanding what little information I could find is that codebehind compiles your files before debugging/releasing where as codefile dosen't require compiling, so maybe this is the problem. I do know that I was able to do it in the past and that other people have had simular problems which normally were cause by having optimized code set in debugging or edit and continue not being set.
Jun 14 '10 #3

P: 7
Well I never found a fix for this but I did find a work around. Hopefully this helps someone else if they have to deal with this.

Currently all my pages are set to use codefile="filename.aspx.vb". I can edit while debugging just fine.

Now if you end up having to add any controls (textbox for example) add the control, change codefile to codebehind and save. Designer file will be updated. Then switch back to codefile and save again.
Jun 16 '10 #4

Frinavale
Expert Mod 5K+
P: 9,731
Thanks for posting the work around solution :)
I'm sure it will help others.

-Frinny
Jun 18 '10 #5

Post your reply

Sign in to post your reply or Sign up for a free account.