I have a VS2017 solution built on dotnet core 2.0 which contains an MVC Core web site and a netcore 2.0 console app and a number of class libraries.
All projects targets NetCoreApp 2.0.7
When I publish any of my projects as self-contained for linux-x64 I get an error when running on Debian 9 saying that System.ComponentModel 4.3.0 was referenced in manifest but that could not be found.
When looking into the .deps.json file I see that it references 4.3.0 but the file in publish output folder is 4.6.2x full framework version.
I tried clearing all nuget cache but still same problem. I noticed other System.* assemblies was 4.6.2x as well.
I see no errors or warnings when building or publishing. When looking in .nuget package folder for netcoreapp linux-x64 I find a System.ComponentModel without version.
I also tried publishing as win10-x64 self-contained and it still publishes 4.6.2x assemblies.
How do I fix this?