I have a .net core 3.1 worker service used as a windows service. The self contained publish fails in visual studio 2019.
Output:
1>------ Publish started: Project: RineService, Configuration: Release Any CPU ------
1>Detected package downgrade: System.Runtime.InteropServices from 4.3.0 to 4.1.0. Reference the package directly from the project to select a different version.
1> RineService -> log4net 2.0.8 -> System.Console 4.0.0 -> runtime.win.System.Console 4.3.0 -> System.Runtime.InteropServices (>= 4.3.0)
1> RineService -> log4net 2.0.8 -> System.Runtime.InteropServices (>= 4.1.0)
1>Detected package downgrade: System.Threading from 4.3.0 to 4.0.11. Reference the package directly from the project to select a different version.
1> RineService -> log4net 2.0.8 -> System.Console 4.0.0 -> runtime.win.System.Console 4.3.0 -> System.Threading (>= 4.3.0)
1> RineService -> log4net 2.0.8 -> System.Threading (>= 4.0.11)
1>Detected package downgrade: System.Diagnostics.Debug from 4.3.0 to 4.0.11. Reference the package directly from the project to select a different version.
1> RineService -> log4net 2.0.8 -> System.IO.FileSystem 4.0.1 -> runtime.win.System.IO.FileSystem 4.3.0 -> System.Diagnostics.Debug (>= 4.3.0)
1> RineService -> log4net 2.0.8 -> System.Diagnostics.Debug (>= 4.0.11)
1>Detected package downgrade: System.Runtime.Extensions from 4.3.0 to 4.1.0. Reference the package directly from the project to select a different version.
1> RineService -> log4net 2.0.8 -> System.IO.FileSystem 4.0.1 -> runtime.win.System.IO.FileSystem 4.3.0 -> System.Runtime.Extensions (>= 4.3.0)
1> RineService -> log4net 2.0.8 -> System.Runtime.Extensions (>= 4.1.0)
1>Detected package downgrade: System.Runtime.InteropServices from 4.3.0 to 4.1.0. Reference the package directly from the project to select a different version.
1> RineService -> log4net 2.0.8 -> System.IO.FileSystem 4.0.1 -> runtime.win.System.IO.FileSystem 4.3.0 -> System.Runtime.InteropServices (>= 4.3.0)
1> RineService -> log4net 2.0.8 -> System.Runtime.InteropServices (>= 4.1.0)
1>Detected package downgrade: System.Threading from 4.3.0 to 4.0.11. Reference the package directly from the project to select a different version.
1> RineService -> log4net 2.0.8 -> System.IO.FileSystem 4.0.1 -> runtime.win.System.IO.FileSystem 4.3.0 -> System.Threading (>= 4.3.0)
1> RineService -> log4net 2.0.8 -> System.Threading (>= 4.0.11)
1>Detected package downgrade: System.Diagnostics.Debug from 4.3.0 to 4.0.11. Reference the package directly from the project to select a different version.
1> RineService -> log4net 2.0.8 -> System.Net.Sockets 4.1.0 -> runtime.win.System.Net.Sockets 4.3.0 -> System.Diagnostics.Debug (>= 4.3.0)
1> RineService -> log4net 2.0.8 -> System.Diagnostics.Debug (>= 4.0.11)
1>Detected package downgrade: System.IO.FileSystem from 4.3.0 to 4.0.1. Reference the package directly from the project to select a different version.
1> RineService -> log4net 2.0.8 -> System.Net.Sockets 4.1.0 -> runtime.win.System.Net.Sockets 4.3.0 -> System.IO.FileSystem (>= 4.3.0)
1> RineService -> log4net 2.0.8 -> System.IO.FileSystem (>= 4.0.1)
1>Detected package downgrade: System.Net.NameResolution from 4.3.0 to 4.0.0. Reference the package directly from the project to select a different version.
1> RineService -> log4net 2.0.8 -> System.Net.Sockets 4.1.0 -> runtime.win.System.Net.Sockets 4.3.0 -> System.Net.NameResolution (>= 4.3.0)
1> RineService -> log4net 2.0.8 -> System.Net.NameResolution (>= 4.0.0)
1>Detected package downgrade: System.Net.Primitives from 4.3.0 to 4.0.11. Reference the package directly from the project to select a different version.
1> RineService -> log4net 2.0.8 -> System.Net.Sockets 4.1.0 -> runtime.win.System.Net.Sockets 4.3.0 -> System.Net.Primitives (>= 4.3.0)
1> RineService -> log4net 2.0.8 -> System.Net.Sockets 4.1.0 -> System.Net.Primitives (>= 4.0.11)
1>Detected package downgrade: System.Runtime.Extensions from 4.3.0 to 4.1.0. Reference the package directly from the project to select a different version.
1> RineService -> log4net 2.0.8 -> System.Net.Sockets 4.1.0 -> runtime.win.System.Net.Sockets 4.3.0 -> System.Runtime.Extensions (>= 4.3.0)
1> RineService -> log4net 2.0.8 -> System.Runtime.Extensions (>= 4.1.0)
1>Detected package downgrade: System.Runtime.InteropServices from 4.3.0 to 4.1.0. Reference the package directly from the project to select a different version.
1> RineService -> log4net 2.0.8 -> System.Net.Sockets 4.1.0 -> runtime.win.System.Net.Sockets 4.3.0 -> System.Runtime.InteropServices (>= 4.3.0)
1> RineService -> log4net 2.0.8 -> System.Runtime.InteropServices (>= 4.1.0)
1>Detected package downgrade: System.Threading from 4.3.0 to 4.0.11. Reference the package directly from the project to select a different version.
1> RineService -> log4net 2.0.8 -> System.Net.Sockets 4.1.0 -> runtime.win.System.Net.Sockets 4.3.0 -> System.Threading (>= 4.3.0)
1> RineService -> log4net 2.0.8 -> System.Threading (>= 4.0.11)
1>Detected package downgrade: System.Runtime.InteropServices from 4.3.0 to 4.1.0. Reference the package directly from the project to select a different version.
1> RineService -> log4net 2.0.8 -> System.Diagnostics.Process 4.1.0 -> Microsoft.Win32.Primitives 4.0.1 -> runtime.win.Microsoft.Win32.Primitives 4.3.0 -> System.Runtime.InteropServices (>= 4.3.0)
1> RineService -> log4net 2.0.8 -> System.Runtime.InteropServices (>= 4.1.0)
1>Detected package downgrade: System.Runtime.InteropServices from 4.3.0 to 4.1.0. Reference the package directly from the project to select a different version.
1> RineService -> log4net 2.0.8 -> System.IO.FileSystem.Watcher 4.0.0 -> Microsoft.Win32.Primitives 4.0.1 -> runtime.win.Microsoft.Win32.Primitives 4.3.0 -> System.Runtime.InteropServices (>= 4.3.0)
1> RineService -> log4net 2.0.8 -> System.Runtime.InteropServices (>= 4.1.0)
1>Detected package downgrade: System.Runtime.Extensions from 4.3.0 to 4.1.0. Reference the package directly from the project to select a different version.
1> RineService -> log4net 2.0.8 -> System.Net.NameResolution 4.0.0 -> System.Net.Primitives 4.0.11 -> runtime.win.System.Net.Primitives 4.3.0 -> System.Runtime.Extensions (>= 4.3.0)
1> RineService -> log4net 2.0.8 -> System.Runtime.Extensions (>= 4.1.0)
1>Detected package downgrade: System.Runtime.InteropServices from 4.3.0 to 4.1.0. Reference the package directly from the project to select a different version.
1> RineService -> log4net 2.0.8 -> System.Net.NameResolution 4.0.0 -> System.Net.Primitives 4.0.11 -> runtime.win.System.Net.Primitives 4.3.0 -> System.Runtime.InteropServices (>= 4.3.0)
1> RineService -> log4net 2.0.8 -> System.Runtime.InteropServices (>= 4.1.0)
1>Detected package downgrade: System.Threading from 4.3.0 to 4.0.11. Reference the package directly from the project to select a different version.
1> RineService -> log4net 2.0.8 -> System.Net.NameResolution 4.0.0 -> System.Net.Primitives 4.0.11 -> runtime.win.System.Net.Primitives 4.3.0 -> System.Threading (>= 4.3.0)
1> RineService -> log4net 2.0.8 -> System.Threading (>= 4.0.11)
1>Detected package downgrade: System.Runtime.Extensions from 4.3.0 to 4.1.0. Reference the package directly from the project to select a different version.
1> RineService -> log4net 2.0.8 -> System.Net.Requests 4.0.11 -> System.Net.Primitives 4.0.11 -> runtime.win.System.Net.Primitives 4.3.0 -> System.Runtime.Extensions (>= 4.3.0)
1> RineService -> log4net 2.0.8 -> System.Runtime.Extensions (>= 4.1.0)
1>Detected package downgrade: System.Runtime.InteropServices from 4.3.0 to 4.1.0. Reference the package directly from the project to select a different version.
1> RineService -> log4net 2.0.8 -> System.Net.Requests 4.0.11 -> System.Net.Primitives 4.0.11 -> runtime.win.System.Net.Primitives 4.3.0 -> System.Runtime.InteropServices (>= 4.3.0)
1> RineService -> log4net 2.0.8 -> System.Runtime.InteropServices (>= 4.1.0)
1>Detected package downgrade: System.Threading from 4.3.0 to 4.0.11. Reference the package directly from the project to select a different version.
1> RineService -> log4net 2.0.8 -> System.Net.Requests 4.0.11 -> System.Net.Primitives 4.0.11 -> runtime.win.System.Net.Primitives 4.3.0 -> System.Threading (>= 4.3.0)
1> RineService -> log4net 2.0.8 -> System.Threading (>= 4.0.11)
1>Detected package downgrade: System.Runtime.Extensions from 4.3.0 to 4.1.0. Reference the package directly from the project to select a different version.
1> RineService -> log4net 2.0.8 -> System.Net.Sockets 4.1.0 -> System.Net.Primitives 4.0.11 -> runtime.win.System.Net.Primitives 4.3.0 -> System.Runtime.Extensions (>= 4.3.0)
1> RineService -> log4net 2.0.8 -> System.Runtime.Extensions (>= 4.1.0)
1>Detected package downgrade: System.Runtime.InteropServices from 4.3.0 to 4.1.0. Reference the package directly from the project to select a different version.
1> RineService -> log4net 2.0.8 -> System.Net.Sockets 4.1.0 -> System.Net.Primitives 4.0.11 -> runtime.win.System.Net.Primitives 4.3.0 -> System.Runtime.InteropServices (>= 4.3.0)
1> RineService -> log4net 2.0.8 -> System.Runtime.InteropServices (>= 4.1.0)
1>Detected package downgrade: System.Threading from 4.3.0 to 4.0.11. Reference the package directly from the project to select a different version.
1> RineService -> log4net 2.0.8 -> System.Net.Sockets 4.1.0 -> System.Net.Primitives 4.0.11 -> runtime.win.System.Net.Primitives 4.3.0 -> System.Threading (>= 4.3.0)
1> RineService -> log4net 2.0.8 -> System.Threading (>= 4.0.11)
1>Detected package downgrade: System.Runtime.InteropServices from 4.3.0 to 4.1.0. Reference the package directly from the project to select a different version.
1> RineService -> log4net 2.0.8 -> System.Net.NameResolution 4.0.0 -> System.Security.Principal.Windows 4.0.0 -> Microsoft.Win32.Primitives 4.0.1 -> runtime.win.Microsoft.Win32.Primitives 4.3.0 -> System.Runtime.InteropServices (>= 4.3.0)
1> RineService -> log4net 2.0.8 -> System.Runtime.InteropServices (>= 4.1.0)
1>Restore failed in 276.28 ms for C:\Users\Sadaqat.razzak1\Downloads\RineService (4)\RineService\RineService\RineService.csproj.
========== Build: 0 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========