Warning as Error

2 views
Skip to first unread message

philip

unread,
Aug 11, 2010, 9:42:02 AM8/11/10
to Spark View Engine Dev
If I call an Obsolete method from a spark file I get a dynamic view
compilation error:

c:\source\blah.spark(24,205): error CS0618: Warning as Error:
'Foo.Bah(string)' is obsolete: 'use baz.'

This has only happened since upgrading from spark 1.0 and mvc 1 to
spark 1.1 and mvc 2. Does anyone know how to supress the error?

Thomas G. Mayfield

unread,
Aug 30, 2010, 11:00:58 AM8/30/10
to Spark View Engine Dev
Bump. I'm getting the same thing with a section of code I've
temporarily disabled with an <if condition="false"> block.

I'd love to have this be configurable, as my spark compilation
integration tests would benefit greatly from finding warnings as
errors (which they currently don't--with the same web.config section,
I get an error on the web but my compilation tests pass), but there
are times when warnings need not be treated as errors.

Thomas G. Mayfield

unread,
Aug 30, 2010, 3:38:44 PM8/30/10
to Spark View Engine Dev
Note to people getting these errors: Check your web.config
system.codedom section for warningLevel="4", which equates to telling
the compiler to treat all warnings as errors. Drop it down to 3.

Thomas G. Mayfield

unread,
Aug 30, 2010, 3:51:21 PM8/30/10
to Spark View Engine Dev
Actually, depending on the warning you may have to drop it lower. Mea
culpa. Easier still is to drop the <system.codedom> section unless
you have need of customizing it.
Reply all
Reply to author
Forward
0 new messages