Trying to publish a console app to run on a linux machine, I publish like this
dotnet publish -c Release -r linux-x64
I try to run the app and get this error
An assembly specified in the application dependencies manifest (XXX.deps.json) was not found:
package: 'runtime.linux-x64.Microsoft.NETCore.App', version: '2.2.0'
path: 'runtimes/linux-x64/native/createdump'
I try publishing using a publish profile to a new output directory.
dotnet publish -p:PublishProfile=Properties\PublishProfiles\FolderProfile.pubxml -o:Release/OutP5
Now my output directory includes a "runtimes" directory, but no linux-x64 directory within that I tried adding a RuntimeIdentifier element in my pubxml, no change, I tried using the publish profile, but also specifying the runtime:
dotnet publish -p:PublishProfile=Properties\PublishProfiles\FolderProfile.pubxml -o:Release/OutP6 -r linux-x64
now my new output directory has no runtimes directory.
I am losing this game of whack-a-mole and I don't know why. What am I missing?