Quantcast
Channel: YouTrackReSharper (RSRP) - Bug and Issue Tracker
Viewing all articles
Browse latest Browse all 106942

RSRP-469291: Resource not found with **\*.cs

$
0
0
Reporter Vianney PHILIPPE (vianney) Vianney PHILIPPE (vianney)
Created Apr 17, 2018 2:20:30 PM
Updated Apr 17, 2018 2:37:06 PM
Subsystem No Subsystem
Assignee Unassigned
Priority Normal
State Submitted
Type Unspecified
Fix version No Fix versions
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions

Description

When using **\*.cs filter in csproj with exclusion for resource files, resource code cannot be resolved anymore.

Note: Using **\*.cs is very handy : less merge conflicts, ensure no file is orphan/not included, smaller csproj content, etc.

Sample Repro

csproj extract :
<ItemGroup>
<Compile Include="**\*.cs" Exclude="Properties\Resource.Designer.cs" />
<Compile Include="Properties\Resource.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resource.resx</DependentUpon>
</Compile>
<EmbeddedResource Include="Properties\Resource.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Resource.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>

Code.cs :
using ResourceNotFound.Properties;

namespace ResourceNotFound
{
public static class Code
{
public static string ResourceOne => Resource.Resource1;
}
}

Resource.resx :
Name: Resource1; Value: One; Comment: Comment for one.

Expected result

No error in solution.

Actual result

Two errors: Cannot resolve symbols Properties (in namespace) and Resource (in property).

Version used

VS 15.6 (VS 2017)
Re# ultimate 2018.1 (sorry!)
.NET 4.5.2

Viewing all articles
Browse latest Browse all 106942

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>