Unsafe code in a web site project
This may not be a best practice, but I have an issue in which ReSharper is
claiming all unsafe code in a web page is in error. I think this is fairly
easy to reproduce:
Create a web site (not a web application) and in the Default.aspx, add
CompilerOptions="/unsafe" to the Page header. The resulting page should be
something like this:
<%@ Page Language="c#" CompilerOptions="/unsafe" ..." %>
In the *.aspx.cs code behind file, add an unsafe method:
public unsafe void DoSomething()
{
int* x;
}
The code compiles and runs even though ReSharper flags all occurrences of
the unsafe keyword and and all pointers.
Please sign in to leave a comment.
Hello Greg,
Thank you for reporting this problem! You can track the progress here: http://youtrack.jetbrains.net/issue/RSRP-274380.
Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"