R# 5.1.1, ASP.NET and @Page CompilerOptions

It appears that R# is not aware of compilation symbols that are defined in
the CompilerOptions attribute of the @Page tag.

Example:

In default.aspx:

<%@Page ... CompilerOptions="/d:DEBUG; NORULES" .. %>
.
.
.

In default.aspx.cs
using System.Diagnositics;


private void Log(....) {
    Debug.Assert(false, 'OH NO!");
    ....
}

R# complains that symbol NORULES is undefined.  Also it will state that the
Debug.Assert statement is unreachable.

This is in VS2008, with version 5.1.1747.3 installed.

Is this a supported scenario?

0
3 comments

Of course, in the Conditional attribute the NORULES is "NORULES".  Sorry for
the typo.

"David Williams" <daviddwill@gmail.com> wrote in message
news:i53p2h$b41$1@nntp-server.labs.intellij.net...

It appears that R# is not aware of compilation symbols that are defined in
the CompilerOptions attribute of the @Page tag.

>

Example:

>

In default.aspx:

>

<%@Page ... CompilerOptions="/d:DEBUG; NORULES" .. %>
.
.
.

>

In default.aspx.cs
using System.Diagnositics;

>


private void Log(....) {
   Debug.Assert(false, 'OH NO!");
   ....
}

>

R

  1. complains that symbol NORULES is undefined.  Also it will state that

the Debug.Assert statement is unreachable.

>

This is in VS2008, with version 5.1.1747.3 installed.

>

Is this a supported scenario?


0

Note however, that adding a  wrote in message
news:i55phv$lgk$1@nntp-server.labs.intellij.net...

Of course, in the Conditional attribute the NORULES is "NORULES".  Sorry
for the typo.

>

"David Williams" <daviddwill@gmail.com> wrote in message
news:i53p2h$b41$1@nntp-server.labs.intellij.net...

>> It appears that R# is not aware of compilation symbols that are defined
>> in the CompilerOptions attribute of the @Page tag.
>>
>> Example:
>>
>> In default.aspx:
>>
>> <%@Page ... CompilerOptions="/d:DEBUG; NORULES" .. %>
>> .
>> .
>> .
>>
>> In default.aspx.cs
>> using System.Diagnositics;
>>
>>
>> private void Log(....) {
>>    Debug.Assert(false, 'OH NO!");
>>    ....
>> }
>>
>> R# complains that symbol NORULES is undefined.  Also it will state that
>> the Debug.Assert statement is unreachable.
>>
>> This is in VS2008, with version 5.1.1747.3 installed.
>>
>> Is this a supported scenario?

0

Any response to this?  Is this the expected result?  If not, I can open an
issue on it.

"David Williams" <daviddwill@gmail.com> wrote in message
news:i55rfb$ns6$1@nntp-server.labs.intellij.net...

Note however, that adding a <compiler> tag to the Web.Config defining the
same compiler options works as expected.

>

"David Williams" <daviddwill@gmail.com> wrote in message
news:i55phv$lgk$1@nntp-server.labs.intellij.net...

>> Of course, in the Conditional attribute the NORULES is "NORULES".  Sorry
>> for the typo.
>>
>> "David Williams" <daviddwill@gmail.com> wrote in message
>> news:i53p2h$b41$1@nntp-server.labs.intellij.net...
>>> It appears that R# is not aware of compilation symbols that are defined
>>> in the CompilerOptions attribute of the @Page tag.
>>>
>>> Example:
>>>
>>> In default.aspx:
>>>
>>> <%@Page ... CompilerOptions="/d:DEBUG; NORULES" .. %>
>>> .
>>> .
>>> .
>>>
>>> In default.aspx.cs
>>> using System.Diagnositics;
>>>
>>>
>>> private void Log(....) {
>>>    Debug.Assert(false, 'OH NO!");
>>>    ....
>>> }
>>>
>>> R# complains that symbol NORULES is undefined.  Also it will state that
>>> the Debug.Assert statement is unreachable.
>>>
>>> This is in VS2008, with version 5.1.1747.3 installed.
>>>
>>> Is this a supported scenario?
>>

0

Please sign in to leave a comment.