Incorrect "path not found" warnings in MVC projects

Answered

I have an MVC5 project which uses the <location path="..."> element in the web.config file to set specific IIS configuration for certain controller actions.

The configuration works as expected. However, R# displays multiple "path not found" warnings for each element, indicating that it's looking for a physical folder instead of an MVC action.

Eg:

<location path="Account/WindowsLogin">
    <system.webServer>
        <security>
            <authentication>
                <windowsAuthentication enabled="true" />
                <basicAuthentication enabled="true" />
                <anonymousAuthentication enabled="false" />
            </authentication>
        </security>
    </system.webServer>
</location>
  • Path "E:\...\Account" not found.
  • Path "E:\...\Account\WindowsLogin" not found.

R# 2019.2, VS2019 v16.2.1

0
3 comments

Hello Richard,

 

Thank you for the feedback.

Unfortunately, I couldn't reproduce the problem from scratch.

Could you please a solution that demonstrates the problem, e.g. by support request?

Thanks in advance.

0

Reproduced and submitted as request #2216838.

0

Hello Richard,

Thank you for the provided info.
Currently, MVC routing isn't supported in ReSharper, please refer to the following request - https://youtrack.jetbrains.com/issue/RSRP-225684.
As workaround, you can either disable current warning or use quick-fix for setting path-mapping.
Thank you.

0

Please sign in to leave a comment.