question

heyangben-3420 avatar image
0 Votes"
heyangben-3420 asked LanHuang-MSFT answered

why asp.net webapi generate a zh-Hans directory in bin directory?

I know this zh-hans means simplified Chinese, but I still don't understand the purpose of generating it
205753-zh-han1.png205754-zh-han2.png


dotnet-aspnet-generaldotnet-aspnet-webapi
zh-han1.png (115.2 KiB)
zh-han2.png (185.9 KiB)
· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.


Did you check if zh-Hans contains some important files?


0 Votes 0 ·

No,I didn't check files in zh-Hans directory,because I don't understand why zh-Hans generate in bin directory

0 Votes 0 ·

I don't know what zh-Hans is for,I think it no to do some things

0 Votes 0 ·

Hi @heyangben-3420,
Is your project asp.net webapi or asp.net core webapi?
Best regards,
Lan Huang

0 Votes 0 ·

asp.net webapi

0 Votes 0 ·

1 Answer

LanHuang-MSFT avatar image
0 Votes"
LanHuang-MSFT answered

Hi @heyangben-3420,
There may be some resource files for localization with the resx extension and the filename ending in the language (eg Resource1.en-us.resx). When the project is built, it generates the folder and contains the culture dll files. Or Nuget references Microsoft.Expression.Interactions.dll and System.Windows.Interactivity.dll, Microsoft.VisualStudio.Web.CodeGeneration.Design, etc.
https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#satelliteresourcelanguages
If you don't need these items, you can exclude them from the project.
Add this line to your *.csproj

 <PropertyGroup>
    <SatelliteResourceLanguages>en</SatelliteResourceLanguages>
 </PropertyGroup>

Best regards,
Lan Huang


If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.