So, I’d just merged some code into my test build to prepare a deployment to staging when I got a compilation error on a page stating that a “}” was expected and referencing a line in a temp file from the GAC that included a line like this:

[System.Diagnostics.DebuggerNonUserCodeAttribute()]

I’m scratching my head…wtf? I searched for the above and found a reference in the strings resource I had for the site. But, there weren’t any problems with the code…in fact, the site compiled just fine! More scratching…then I searched online. Found this. Different error but the same or rather a similar stack trace.

Then I thought about it. Missing closing bracket…well, we’d just modified some code recently that involved what I’m sure Microsoft would rather we didn’t do…in the front-end aspx file we did something like this:

<% if (something == true) { %>

<myfancyhtml></myfancyhtml>

<% }//end if %>

And, lo and behold, the recent merge managed to include two copies of the opening line with a single closing line. Lovely.

Anyhow, in case you run into this wonderfully obscure error, check your <% %> tags if the code behinds still compile successfully…probably have something in there that’s causing you problems…no need to reboot and all that crap.

kn

Tagged with: