Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In .NET projects, when a resource file is added using the VS UI, the files may not be indexed by default. #1786

Closed
rohanp-msft opened this issue Nov 12, 2021 · 1 comment
Assignees
Labels
area-MRTCore ResourceManager bug Something isn't working

Comments

@rohanp-msft
Copy link
Contributor

rohanp-msft commented Nov 12, 2021

Describe the bug

In .NET projects, when a resource file is added using the VS UI, the files may not be indexed by default.

Steps to reproduce the bug

Examples of this issue:

If the files are added through UI, VS will automatically add something like this for a WPF app:

  <ItemGroup>
    <Content Remove="<image file name>" />
  </ItemGroup>

  <ItemGroup>
    <PRIResource Remove="<resw file name>" />
  </ItemGroup>

For a WinForm/Console app, what’s added is a little different:

  <ItemGroup>
    <Content Remove="<image file name>" />
  </ItemGroup>
 
  <ItemGroup>
    <None Remove="<resw file name>" />
  </ItemGroup>

Expected behavior

Content Remove and PRIResource Remove entries should not appear in the CSPROJ file.

Work around

To work around this issue, please remove the entries below in the CSPROJ file (the None Remove entries can remain):

  <ItemGroup>
    <Content Remove="<image file name>" />
  </ItemGroup>

  <ItemGroup>
    <PRIResource Remove="<resw file name>" />
  </ItemGroup>

Screenshots

No response

NuGet package version

1.0.0-preview3

Packaging type

Packaged (MSIX), Unpackaged

Windows version

Insider Build (xxxxx)

IDE

Visual Studio 2019

Additional context

No response

@rohanp-msft
Copy link
Contributor Author

Closing since this is a dupe of #1674

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-MRTCore ResourceManager bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant