Answer
Now, how do I run the application? I understand that since this is a standalone .NET Core application, I DO NOT need to download and install .NET Core. My application should contain everything that it needs.
You're right. Run the executable file.
When you create a stand-alone application, the publication output "contains the complete set of files (both application files and all .NET Core files) needed to run your application." This includes an executable file.
Self-deployment example
Here is the result of dotnet publish -c release -r ubuntu.14.04-x64
for a simple stand-alone application. Copy the publishing directory to Ubuntu and run the executable.
C: \ MyApp \ Bin \ release \ netcoreapp1.0 \ ubuntu.14.04-x64 \ publish \
... libsos.so libsosplugin.so libuv.so Microsoft.CodeAnalysis.CSharp.dll Microsoft.CodeAnalysis.dll Microsoft.CodeAnalysis.VisualBasic.dll Microsoft.CSharp.dll Microsoft.VisualBasic.dll Microsoft.Win32.Primitives.dll Microsoft.Win32.Registry.dll mscorlib.dll mscorlib.ni.dll MyApp <------- On Ubuntu, run this executable MyApp.deps.json and you will see Hello World! MyApp.dll MyApp.pdb MyApp.runtimeconfig.json sosdocsunix.txt System.AppContext.dll System.Buffers.dll System.Collections.Concurrent.dll System.Collections.dll ...
C: \ MyApp \ project.json
{ "buildOptions": { "debugType": "portable", "emitEntryPoint": true }, "dependencies": {}, "frameworks": { "netcoreapp1.0": { "dependencies": { "Microsoft.NETCore.App": "1.0.1" } } }, "runtimes": { "ubuntu.14.04-x64" : {}, "win10-x64" : {} } }
C: \ MyApp \ Program.cs
public class Program { public static void Main(string[] args) { System.Console.WriteLine("Hello World!"); } }
see also
This document is different from structure-dependent and stand-alone deployment.
source share