Asp – Visual Studio Asp.net Website Compilation error: Child nodes not allowed

asp.netvisual-studio-2008

"Child nodes not allowed" seems to be notorious compilation error on Asp.net website if you do some googling.

Environment: WinXp, VS2008 and VS2008 SP1, .NET 3.5 SP1

Behavior: create a brand new Asp.net website (not web application), then just build it, you got compilation error "Child nodes not allowed" on the Web.config on line where it says providerOption name="CompilerVersion" value="v3.5"/>

I got this problem after I re-installed vs2008. Now, a lot of people are suggesting fixes but none worked for us. Only one guy mentioned he successfully got rid of this problem by re-installing windows, but we don't want to go that far if we don't have to. There is another person who opened a ticket to MS but hasn't gotten back a response yet.

If there is anyone out there who has similar environment like us and know how to get around this problem, we'd really appreciate it!!!

Edit The weirdest part of all this is that I don't know how I got it. It is a brand new box and brand new installation.

Best Answer

My colleague just found a fix for this dreadful problem, it is a .NET Framework Cleanup Utility at http://cid-27e6a35d1a492af7.skydrive.live.com/self.aspx/Blog|_Tools/dotnetfx20|_cleanup|_tool.zip

Just download, run and restart your machine and re-install .NET Framework 3.5 SP1 (since the cleanup util removes all the .NET Frameworks for you)! Really hope this could help others who have the same problem, it's been 4 days fighting with this one issue, thanks Microsoft!

Thank you guys very much for your input, I voted up for you both, appreciate it!

Ray.