System.Private.ServiceModel missing in azure app service at runtime

I was encountering a similar solution after trying to use the SoapCore NuGet package in ASP.NET Core 2.1 application. Ran fine locally on Windows 10 but gave the exact same stack trace as the original poster after I published to Azure. The following GitHub issue helped me understand the problem:

https://github.com/dotnet/wcf/issues/2349

For me, SoapCore was referencing System.ServiceModel.Http 4.4.0, and it had a dependency on System.Private.ServiceModel 4.4.0. If you download the NuGet package and open the nupkg file for System.Private.ServiceModel 4.4.0 and observe the "runtimes" sub-folder, you'll see it only lists "win7" and "unix". Azure appears to be looking for runtimes "win-x86" or "win-x64", and the GitHub issue above explains how those RID's were not included by the "win7" RID. Seeing that the issue was closed, I downloaded the System.Private.ServiceModel 4.5.0 to inspect the "runtimes" sub-folder and see that it was changed from "win7" to "win" just like mentioned in the GitHub issue.

To solve my issue, I directly added a dependency for System.ServiceModel.Http 4.5.0 to my project. This included the newer dependency for System.Private.ServiceModel 4.5.0 and Azure would recognize the "win" runtime properly to ensure the necessary DLL was included with my application when published.