Skip to content

Custom Tool does not work for linked itemsΒ #6171

@rainersigwald

Description

@rainersigwald

From @hakito on Monday, June 24, 2019 10:15:59 AM

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

Copied from original issue: dotnet/msbuild#4467

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature-Resource-DesignerDEPRECATED The legacy resource file (RESX) editor.Triage-InvestigateReviewed and investigation needed by dev team

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions