DotNetCorePlugins/test/TestProjects/PowerShellPlugin/Program.cs
Nate McMaster c513f0ba6c
fix: ensure transitive dependencies of shared types unify
Recursively load and find all dependencies of default assemblies. This sacrifices some performance for determinism in how transitive dependencies will be shared between host and plugin.

Fixes #41
2019-09-04 23:21:47 -07:00

25 lines
596 B
C#

using System;
using System.Management.Automation;
namespace PowerShellPlugin
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(GetGreeting());
}
public static string GetGreeting()
{
using (var ps = PowerShell.Create())
{
var type = typeof(AliasAttribute);
// Console.WriteLine(type.Assembly.Location);
var results = ps.AddScript("Write-Output hello").Invoke();
return results[0].ToString();
}
}
}
}