ordercloud-api / headstart

A complete and opinionated eCommerce solution using OrderCloud as the backbone - built with .NET Core and Angular
MIT License
31 stars 74 forks source link

Resolve duplicate files on build in recommended way #491

Closed crhistianramirez closed 1 year ago

crhistianramirez commented 1 year ago

In a previous commit 50422304b1277a0a9b67d781b99788b8c3201e05 I suppressed errors for duplicate published output files to fix the build which was failing due to an error introduced in .net sdk 6.0.100

I found out recently however that the recommended way of dealing with this is instead to not have duplicate output files which can be achieved by changing "CopyToOutputDirectory" from "Always" to "PreserveNewest". More info here: https://learn.microsoft.com/en-us/dotnet/core/compatibility/sdk/6.0/duplicate-files-in-output#recommended-action