Code anaylysis does not consider imported project in sdk style csproj


We have a common `props` file which we import using `<import project="...props" />` in all of our projects.

It contains stuff like:


<ItemGroup Condition="$(IsWindows)">
<Compile Include="**/*.cs" Exclude="$(DefaultItemExcludes);**/*.macOS.cs;**/*.Linux.cs"/>
<Compile Remove="*.Linux.cs; *.macOS.cs;"/>


This works fine in Rider and analyzes the code perfectly. But with VS 2019 + R# 2019.3.1 it still includes the excluded files for code analysis.

I am assuming that R# is not considering the imported props file.

Any help would be appreciated!

1 comment
Comment actions Permalink

Hello Abhinav Hardikar,


Sorry for the delay in responding.

Could you please try disabling ReSharper | Options | Environment | General | Read solution model directly and check if it helps?

Thank you.


Please sign in to leave a comment.