nopSolutions / nopCommerce

ASP.NET Core eCommerce software. nopCommerce is a free and open-source shopping cart.
https://www.nopcommerce.com
Other
9.3k stars 5.32k forks source link

Installation resource names are incorrectly cased #5815

Closed serialseb closed 3 years ago

serialseb commented 3 years ago

nopCommerce version: 4.40

Steps to reproduce the problem: We compile NopCommerce as a set of Razor SDK nuget packages, to use as dependencies in our systems, and we embed certain resource files in App_Data. The details of why we do this are out of scope for this issue, however as part of that architecture, we use the files located in App_Data/Localization/Installation together with the nuget package Microsoft.Extensions.FileProviders.Embedded, and those packages require correct file name casing for resources on Linux platforms.

When building the Nop.Web project, some of the resource files have incorrect casing, which prevent correctly building in such a way on Linux. This includes specifically the following files:

A typical example of the resulting build errors would be this MSBuild output:

/home/runner/.dotnet/sdk/5.0.400/Microsoft.Common.CurrentVersion.targets(4679,5): error MSB3021: Unable to copy file "/home/runner/work/Core/Core/nope/Nope/src/Presentation/Nop.Web/bin/Release/net5.0/bn-bd/Nop.Web.resources.dll" to "bin/Release/net5.0/linux-x64/bn-bd/Nop.Web.resources.dll". Could not find a part of the path '/home/runner/work/Core/Core/shop/DooVillage/DooPlatform.StoreFront/bin/Release/net5.0/linux-x64/bn-bd/Nop.Web.resources.dll'. [/home/runner/work/Core/Core/shop/DooVillage/DooPlatform.StoreFront/DooPlatform.StoreFront.csproj]

The dependency on Humanizr is also lagging, which also results in incorrect resource files being imported (they had the same issue in their projects which they subsequently fixed), but updating the Nop solution to the latest version fixes those issues for us

I'd like to submit a patch to fix the casing on those files, and if you wish, to the latest Humanizr version that fixes this issue too.

Please advise if you wish to receive those patches for integration, at which point I'll open a pull request.

Many thanks

exileDev commented 3 years ago

Hi, @serialseb! It would be great. We're open to suggestions