netcorehost 0.5.0

A Rust library for hosting .NET Core applications.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use netcorehost::{nethost, pdcstr};

#[path = "../helpers/dotnet-build.rs"]
mod dotnet_build;

fn main() {
    dotnet_build::build_example_project("run-app");

    let hostfxr = nethost::load_hostfxr().unwrap();
    let context = hostfxr
        .initialize_for_dotnet_command_line(pdcstr!(
            "examples/run-app/ExampleProject/bin/Debug/net5.0/ExampleProject.dll"
        ))
        .unwrap();
    context.run_app();
}