0

I cant find a clear cut solution to this error that happens for a new project in Visual Studio 2010. It doesnt tell me where it's happening at all, just inside the website. Any clue on where I should look to fix this issue?

(0,0): error CS1647: An expression is too long or complex to compile
Validation Complete
========== Build: 2 succeeded or up-to-date, 1 failed, 0 skipped ==========
Mike Flynn
  • 22,342
  • 54
  • 182
  • 341

1 Answers1

3

This is a compiler bug. From Connect:

Unfortunately, there's not much we can do here without isolating the issue further. Usually, this error results from a deeply chained expression in your source, such as a long chain of string concatenations ("aaaa" + "bbbb" + ...). Such expressions are parsed and bound recursively in the compiler, and there is a depth at which the compiler will run out of stack space to continue parsing. The exact expression complexity supported depends on the data stashed in the compiler's stack frames, which can vary subtly between updates - if an expression in your solution was right at the boundary before, it may have tipped over.

I recommend looking for long string concatenations, multi-line math formulas, etc.

David Crowell
  • 3,711
  • 21
  • 28