dotnet build does not include Norwegian resource files in the output
See original GitHub issueDescribe the bug
Building a .sln og .csproj file with dotnet build
does not behave as expected for Norwegian resource files.
This seems to work ok with msbuild (if you trigger the build through VS and not directly with dotnet cmdline)
To Reproduce
- Create an ASP.NET Core Web App in Visual Studio 2022
- Add a folder named
Resources
- Add resource files for
en
,de
andno
with a single resource of key-value"Hello": "World"
- Build the solution or project with
dotnet build
- Navigate to the bin folder and see that only
en
andde
folders are created, there is nono
folder - Change name of
no
tonb
and rebuild. - Verify
nb
folder now exists
Further technical details
- Running on Visual Studio 2022
- .NET SDK: Version: 6.0.101
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
dotnet build not including text file resource content
These files are accessed in the code as follows: _listItems = Properties.Resources.ListItems.Split(new string[] { Environment.NewLine }, ...
Read more >dotnet build command - .NET CLI
The dotnet build command builds a project and all of its dependencies. ... from NuGet are typically NOT copied to the output folder....
Read more >dotnet publish command - .NET CLI
The --output option is disallowed because all outputs of all built projects would be copied into the specified directory, which isn't compatible ...
Read more >Energy Research Abstracts
File Number DE85770236 . ... 54 collectors with a total area of 1728 m2 are to supply a petro ... Sponsored in part...
Read more >How To Use Localization in ASP.NET Core
Syntax: file-name.language-region.resx. Next, we are going to add the resource files for localization in our project by following the steps ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There are many aliased cultures. aliased cultures have different names but share the culture data for other standard cultures. Enumeration using
CultureInfo.GetCultures
doesn’t return the aliased cultures. There are many reasons for that, one is having users use the standard names instead of the aliased ones. The second reason is listing 2 cultures in the enumerations which point to same data can cause issues (e.g. someone populating the list in a dropdown UI list using the display names which can show a duplicate at that time).MSBuild has a tracking issue https://github.com/dotnet/msbuild/issues/3897 to fix the build as it is not right to scope the support to the cultures returned only by
CultureInfo.GetCultures
.Last, I want to emphasize, anyone using
CultureInfo.GetCultures
to check if any culture is supported or limit the functionality support to such list would be wrong and need to fix that. Now on Windows 10 and any Linux/MacOS when using ICU library, can create any culture with any name conforming to the BCP-47 spec even the system not having a data for that culture. That means it is impossible to return any list satisfying what you want to do. Therefore, we have exposed the API to create the culture and having a Boolean flag to pass if you want to restrict the creations to the cultures has a data in the system.CC @BenVillalobos
Confirmed I can reproduce this. Here’s the relevant part of the binlog: