I stumbled across this bug today while editing a .NET 2.0 ASP.NET web application project in Visual Studio 2008 and it may actually pertain more to Visual Studio than to ReSharper itself so I've submitted the bug report there as well...
In a .NET 2.0 ASPX markup file I was doing some C# logic within the page itself and at the suggestion of ReSharper's code inspection I switched an explicit variable definition to the 'var' keyword inside an ASP script tag (<% %> or <script></script>). After doing this I ran the page only to receive a compilation error stating that the 'var' keyword was unrecognized despite Visual Studio properly highlighting it. Testing further I moved the same expression into the code behind, compiled, and ran the page without incident. Reproducing the same steps in a .NET 3.5 web application produces no compilation error.
Suggested fix: Don't offer the code inspection 'var' keyword suggestion inside an ASPX markup file if the current project is built on .NET 2.0.
var x = "Hello World";
Server Error in '/' Application.
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0246: The type or namespace name 'var' could not be found (are you missing a using directive or an assembly reference?)