Skip to content

[NETSDKE2E][Loc] Strings are unlocalized on the output of 'dotnet run' in multi TFM project. #52280

@vwenchen

Description

@vwenchen

REGRESSION INFO

None

INSTALL STEPS

  1. Install NET10.0.200 SDK on Windows11-x64 24H2 German OS

REPRO STEPS

  1. Create an empty solution, add a C# Console application which targets net48 and net10.0 in CLI
    dotnet new sln -o FSNCApp2
    cd FSNCApp2
    dotnet new console -o myconsole
    dotnet sln add myconsole/myconsole.csproj
    cd myconsole
    notepad myconsole.csproj

  2. Modify csproj like this

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFrameworks>net10.0;net48</TargetFrameworks>
    <ImplicitUsings>disable</ImplicitUsings>
    <Nullable>enable</Nullable>
    <LangVersion>latest</LangVersion>
  </PropertyGroup>

</Project>
  1. Notepad program.cs
    Add 'using System;' in Program.cs file.

  2. Build and Run for each target framework
    dotnet run

Expected

Strings localization

Actual

Strings not localization

Image

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