Search

Using configSource for <system.web><compilation> section breaks debugging in VS2008 by Boris Byk

Closed
as Fixed Help for as Fixed

10
0
Sign in
to vote
Type: Bug
ID: 312199
Opened: 11/25/2007 9:55:57 AM
Access Restriction: Public
0
Workaround(s)
3
User(s) can reproduce this bug
I have Visual Studion 2008 Professional. In my VS2005 web-projects I used 'configSource' attribute at configuration sections to load external configuration file, e.g. for the <system.web><compilation> section and it worked fine. But the VS2008 breaks this behavior regarding this section. When I try to debug project in VS2008 it shows:

"The page cannot be run in debug mode because debigging is not enabled in Web.config file".

Web.config:

<compilation configSource="compilation.config" />
---

compilation.config:

<compilation debug="true"> <<<< the attribute debug="true" exists! <<<<
<assemblies>
....
</assemblies>
</compilation>

This breaking behavior hits me badly because I use external file configuration for my deployment scenarious.

P.S. Anyone can validate this bug by downloading this repro solution via http://escogido.ru/microsoft/webbugrepro.zip (does not contain any exe-files).
Details (expand)
Product Language
English

Version

Visual Studio 2008 (All Products and Editions)
Operating System
Windows XP Professional
Operating System Language
Russian
Steps to Reproduce
1) Open solution from attach.
2) Debug -> Start debugging or press F5.

You'll see the 'Debugging Not Enabled' popup.
Actual Results
It tries to add debug=true to

<compilation configSource="compilation.config" />

that breaks starting the project.
Expected Results
Debugging of web application project should be started successfully.
TAP Code (if applicable)
 
      You can indicate your satisfaction with how Microsoft handled this issue by completing this quick 3 question survey. [Details]

 

Sign in to post a comment.
Posted by Microsoft on 6/9/2008 at 11:46 AM
The fix should appear in sp1 beta now.

If we see compilation configSource in web.config, we'll assume the user put debug=true in the config source config file and simply ignore putting debug=true.

e.g.

1. Create a compilation.config under root
2. move web.config's compilation node to compilation.config, and make it debug=true
3. In web.config's original place, put <compilation configSource='compilation.config' /> Save.
4. F5. Verify debugging started successfully.

e.g.
<compilation debug="true">
<assemblies>
    ...
</assemblies>
</compilation>
Posted by isanchez_msn on 3/3/2008 at 2:32 PM
When moving from VS 2005 to 2008, we've noticed that the <compilation debug="true" /> section we have set up in our machine.config files is also being ignored. Is this going to be addressed in a patch?
Posted by Activa Consult on 2/28/2008 at 2:22 AM
What if your web application project is precompiled with debug info already included? In that case you don't need any <compilation> sections in the web.config, but still Visual Studio complains. This should at least be configurable.
Posted by Microsoft on 2/20/2008 at 6:28 PM
Thank you for your feedback. We have addressed this issue by not modifying the debug flag (<compilation debug="true"> ) in case the config source is an external file. We will assume that the user has set this in the external config and straightaway launch the debugging.
You should see this fixed in the next service pack of visual studio.
Thanks
The Visual Web Developer Team
Posted by mhildreth on 1/8/2008 at 1:38 PM
If anyone has found a solution, please feel email me - mhil18@hotmail.com
Posted by mhildreth on 1/8/2008 at 12:11 PM
I have been experiencing the same issue as well.
Posted by Microsoft on 11/25/2007 at 11:05 AM
Thanks for your feedback. We are escalating this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.

Thank you,
Visual Studio Product Team
Sign in to post a workaround.