Skip to content

Custom Tool does not work for linked items #4467

@hakito

Description

@hakito

Steps to reproduce

In VS2019

  • Add existing item
  • Choose a resource file
  • Add as link
  • Set custom tool to PublicResXFileCodeGenerator

Build the project / solution / run custom tool do not generate a file.

Project file

<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
    <PropertyGroup>
        <TargetFramework>net462</TargetFramework>
    </PropertyGroup>
    <ItemGroup>
      <EmbeddedResource Include="..\..\I18n\Commons\I18N.resx" Link="Properties\I18N.resx">
        <Generator>PublicResXFileCodeGenerator</Generator>
      </EmbeddedResource>
    </ItemGroup>
</Project>

Directory contents:

../../I18n/Commons
- I18N.resx

Expected behavior

Generates or updates designer.cs file. It is working for non linked resources and with the old project format.

Actual behavior

Nothing happens

Environment data

msbuild /version output:
16.1.76.45076
OS info: Win 10 Enterprise x64
Visual Studio 2019 16.1.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions