Resharper cannot resolve "Inherits" class name for CodeFile .aspx pages

Answered

I have a .aspx file, with the following Page tag:

<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeFile="BorrowerDetails.aspx.vb" EnableViewState="False" Inherits="BorrowerDetails" %>

The .aspx.vb file referenced has its Build Action property set to Content, so it's not compiled into the main .dll.

With ReSharper disabled, this all works just fine. But when ReSharper is enabled, it turns the "BorrowerDetails" class name red, and says "Cannot resolve symbol". And since it can't find the class the page is based on, it also marks any properties of the Page object as unresolved (e.g. "Context", or the "ResolveUrl" function.)

Also, when editing the .aspx.vb file, ReSharper's auto-complete IntelliSense dropdowns don't work. It just says "no suggestions" when I try to get a list of methods/properties on a control on the page.

Does ReSharper not support CodeFiles, where the class isn't pre-compiled into the main site's dll?

3 comments
Comment actions Permalink

Hello Joel,

 

I couldn't reproduce the problem with the project created from scratch.

Could you please share a sample project in which the project is reproduced? You can do it using our https://uploads.jetbrains.com/ service.

Thank you.

0
Comment actions Permalink

Here's a sample project, along with 2 screenshots showing the problem.

Upload id: 2021_09_03_2S4mCJ6Npq5rJ3s2 (files: CodeFileTest.zip and 2 more)

0
Comment actions Permalink

Hello Joel,

thank you for the provided info.

I've filed a corresponding issue - https://youtrack.jetbrains.com/issue/RSRP-485944.

Please follow it to get the latest updates.

Thank you.

0

Please sign in to leave a comment.