CS1529: A using clause must precede all other namespace elements except extern alias declarations

by Sumant 20. December 2009 23:56

This error is self explanatory in itself, but I was going nuts as my code behind file was all correct and still the browser was throwing this error back.

I had just migrated my blog and was trying to run it for the first time. This made me believe that some settings at the server side are going wrong. I tried all possible tweaks and wasted good amount of hours over this. Reconfigured everything again, but no luck!

Finally, I decided to remove the file because of which this exception was being thrown. It was an extension, so I removed all of the associated code files from the server and tried it again. And! It worked as if nothing happened ever.

Confused, and unable to understand the cause, I thought of redeploying those file from my previous backup. I did that and nothing broke! I guess there was some problem with the files that I migrated from my old server to new server.

Technically, not sure what it was. If you happen to know the issue / cause / resolution, please leave a comment about it. Thanks.

Share   
Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Tags: , ,

.NET | ASP.NET | BlogEngine.NET

© 2008 Sumant Dubey

About this blog

Absolutely technical! The posts are about concepts, tricks, articles and links on technical subjects / problems which are not very obvious to understand / resolve. Purpose is to have this as the first-aid in the time of need.

Disclaimer

The opinions expressed on this website are my own personal opinions and do not represent my employer's view in anyway.