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

No zh-CN resouces.dll is generated when using dotnet build command #5381

Closed
baochenw opened this issue Sep 24, 2021 · 8 comments
Closed

No zh-CN resouces.dll is generated when using dotnet build command #5381

baochenw opened this issue Sep 24, 2021 · 8 comments
Assignees
Labels
Bug Product bug (most likely) urgent status: This issue needs immediate attention

Comments

@baochenw
Copy link

baochenw commented Sep 24, 2021

  • .NET Core Version: (e.g. 6.0 RC1, or daily build number, use dotnet --info)
    dotnet --info

.NET SDK (reflecting any global.json):
Version: 6.0.100-rc.1.21458.32
Commit: d7c22323c4

Runtime Environment:
OS Name: Windows
OS Version: 10.0.22000
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\6.0.100-rc.1.21458.32\

Host (useful for support):
Version: 6.0.0-rc.1.21451.13
Commit: d7619cd4b1

.NET SDKs installed:
5.0.400 [C:\Program Files\dotnet\sdk]
6.0.100-rc.1.21458.32 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.0-rc.1.21452.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.0-rc.1.21451.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.0-rc.1.21451.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download

  • Windows version: (winver)
    Windows 11 21H2 Build 22000.194

  • Does the bug reproduce also in WPF for .NET Framework 4.8?: Not sure

  • Is this bug related specifically to tooling in Visual Studio (e.g. XAML Designer, Code editing, etc...)? If yes, please file the issue via the instructions here.
    No, Visual Studio 2022 17.0.0 preview 4.0 works well

Problem description:
As the attached test project, using dotnet build command to build this project.

Actual behavior:
No zh-CN resources.dll is generated.

dotnet build

Microsoft (R) Build Engine version 17.0.0-preview-21458-01+2c5510013 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

Determining projects to restore...
Restored C:\path-to-project\WpfAppTest\WpfAppTest.csproj (in 78 ms).
You are using a preview version of .NET. See: https://aka.ms/dotnet-core-preview
You are using a preview version of .NET. See: https://aka.ms/dotnet-core-preview
WpfAppTest -> C:\path-to-project\WpfAppTest\bin\Debug\net6.0-windows\WpfAppTest.dll
WpfAppTest -> C:\path-to-project\WpfAppTest\bin\Debug\net5.0-windows\WpfAppTest.dll

Build succeeded.
0 Warning(s)
0 Error(s)

Time Elapsed 00:00:02.03

dir bin\Debug\net6.0-windows\

Volume in drive C has no label.
Volume Serial Number is 627F-2271

Directory of C:\path-to-project\WpfAppTest\bin\Debug\net6.0-windows

09/24/2021 11:05 AM

.
09/24/2021 11:05 AM ..
09/24/2021 11:05 AM ja
09/24/2021 11:05 AM ref
09/24/2021 11:05 AM 639 WpfAppTest.deps.json
09/24/2021 11:05 AM 8,192 WpfAppTest.dll
09/24/2021 11:05 AM 147,968 WpfAppTest.exe
09/24/2021 11:05 AM 13,624 WpfAppTest.pdb
09/24/2021 11:05 AM 293 WpfAppTest.runtimeconfig.json
09/24/2021 11:05 AM zh-Hans
5 File(s) 170,716 bytes
5 Dir(s) 263,739,359,232 bytes free

Expected behavior:
WpfAppTest.resources.dll exists in zh-CN dir

Minimal repro:
WpfAppTest.zip

@baochenw
Copy link
Author

This issue is not reproducible with .NET 5.0 sdk or Visual Studio 2022 Preview 4.0

@ThomasGoulet73
Copy link
Contributor

@botcher I was not able to reproduce it in Visual Studio but I was able to reproduce it with dotnet build.

@vishalmsft vishalmsft added Bug Product bug (most likely) urgent status: This issue needs immediate attention and removed Untriaged Requires WPF team triage labels Sep 28, 2021
@ryalanms
Copy link
Member

ryalanms commented Sep 28, 2021

I am able to reproduce it with 6.0 RTM. zh-CN is only created when the application is built with .NET Framework msbuild through VS.

@ryalanms
Copy link
Member

zh-CN isn't identified as a culture when building with .NET Core targeting .NET Core. Building with .NET Framework (VS) targeting .NET Core does identify zh-CN as a culture.

.NET Framework:

image

.NET Core:

image

@ryalanms
Copy link
Member

ryalanms commented Sep 28, 2021

This may be related: dotnet/msbuild#3897

@dsplaisted @sfoslund: Should this be moved to the msbuild repo?

@sfoslund
Copy link
Member

Not sure, @benvillalobos?

@benvillalobos
Copy link
Member

Looks like an msbuild issue.

Our AssignCulture task looks to include a hardcoded set of valid cultures in .netframework. Judging by discussion in the linked msbuild issue (3897) it looks like this is blocked by either enabling the hardcoded list in .net core, or updating msbuild to net5.0 and taking advantage of the Culture API.

Closing this and linking to dotnet/msbuild#3897 as the canonical issue for this.

@baochenw
Copy link
Author

It looks a regression in .NET 6. it works with .NET 5. Do we have a solution?

@ghost ghost locked as resolved and limited conversation to collaborators Apr 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Product bug (most likely) urgent status: This issue needs immediate attention
Projects
None yet
Development

No branches or pull requests

6 participants