I'm trying to compile and run my first cross-platform app using .net core to migrate a c# app. I am trying to run this on Debian stretch 9.3
I've run both of these commands.
dotnet build -r debian-x64
dotnet publish -c release -r debian-x64
dotnet build -r linux-x64
dotnet publish -c release -r linux-x64
I get folders for each of these, (bin\Release\netcoreapp2.0\linux-x64 and bin\Release\netcoreapp2.0\debian-x64 respectively) which I used SFTP to copy to my linux box. In linux, I cd into the folder and run .\program
I get the following error while trying to use either the debian specific or generic linux compiled code.
Error:
An assembly specified in the application dependencies manifest (nfz_core.deps.json) was not found:
package: 'runtime.linux-x64.Microsoft.NETCore.App', version: '2.0.0'
path: 'runtimes/linux-x64/lib/netcoreapp2.0/Microsoft.CSharp.dll'
I think I may have done something wrong in my csproj file, but I can't seem to figure out what I did wrong.
Here is my .csproj file
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<RuntimeIdentifiers>win10-x64;debian-x64;linux-x64</RuntimeIdentifiers>
</PropertyGroup>
</Project>
I appreciate any insight people could give.
publishfolder or the other one?bin\Release\netcoreapp2.0folder to Linux, and run your app withdotnet program.dllcommand. Also see this issue, could be relevant: github.com/dotnet/cli/issues/7543bin\Release\netcoreapp2.0\linux-x64\publishinstead. That is where the output ofdotnet publishgoes.