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

Embedded resources with extension other than *.resx are named incorrectly if a source code file with the same name is present(.NET Core 3.0 release) #4761

Closed
aerworker opened this issue Sep 25, 2019 · 2 comments
Labels

Comments

@aerworker
Copy link

ConsoleApp1.zip

Steps to reproduce

Build and run attached application.

dotnet build ConsoleApp1.csproj
bin\Debug\netcoreapp3.0\ConsoleApp1.exe

Note that SomeFile3.cs is depended upon SomeFile3.SomeExtension.
Project file

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp3.0</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <None Remove="SomeFile1.SomeExtension" />
    <None Remove="SomeFile2.SomeExtension" />
    <None Remove="SomeFile3.SomeExtension" />
  </ItemGroup>

  <ItemGroup>
    <EmbeddedResource Include="SomeFile1.SomeExtension" />
    <EmbeddedResource Include="SomeFile2.SomeExtension" />
    <EmbeddedResource Include="SomeFile3.SomeExtension" />
  </ItemGroup>

  <ItemGroup>
    <Compile Update="SomeFile3.cs">
      <DependentUpon>SomeFile3.SomeExtension</DependentUpon>
    </Compile>
  </ItemGroup>
</Project>

Directory contents:

/
-Program.cs
-SomeClass1.cs
-SomeClass1.resx
-SomeFile1.SomeExtension
-SomeFile2.cs
-SomeFile2.SomeExtension
-SomeFile3.cs
-SomeFile3.SomeExtension

Expected behavior

program output should include:

ConsoleApp1.SomeClass1.resources
ConsoleApp1.SomeFile1.SomeExtension
ConsoleApp1.SomeFile2.SomeExtension
ConsoleApp1.SomeFile3.SomeExtension

or at least

ConsoleApp1.SomeClass1.resources
ConsoleApp1.SomeFile1.SomeExtension
ConsoleApp1.Class2.SomeExtension
ConsoleApp1.SomeFile3.SomeExtension

Actual behavior

program output include:

ConsoleApp1.SomeClass1.resources
ConsoleApp1.SomeFile1.SomeExtension
ConsoleApp1.Class2
ConsoleApp1.Class3

Environment data

dotnet --version output:
3.0.100

@aerworker aerworker changed the title Embedded resources with extensions other than *.resx are named incorrectly if a source code file with the same name is present(.NET Core 3.0 release) Embedded resources with extension other than *.resx are named incorrectly if a source code file with the same name is present(.NET Core 3.0 release) Sep 25, 2019
@rainersigwald
Copy link
Member

Thank you for the report. Closing in favor of the copy we're actively investigating.

@rainersigwald
Copy link
Member

Duplicate of #4740

@rainersigwald rainersigwald marked this as a duplicate of #4740 Sep 25, 2019
@AR-May AR-May added the triaged label Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants