Files
PowerShell/docs/host-powershell/sample-dotnet2.0-powershell-crossplatform/MyApp/Program.cs
T
Aditya Patwardhan a53547ce78 Add scripts to generate unified Nuget package (#6167)
Remove the functions which generated Nuget packages for Windows.
Add function New-UnifiedNugetPackage to generate nuget packages for each assembly with unix and windows runtimes.
Add function New-NuSpec and New-ReferenceAssembly for creating the required items forNew-UnifiedNugetPackage.
Add a sample for cross platform project with conditional compilation for Linux.
Add function Publish-NugetToMyGet to publish nuget packages to powershell.myget.or
2018-02-26 15:35:09 -08:00

26 lines
742 B
C#

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using System;
using System.Management.Automation;
namespace Application.Test
{
public class Program
{
/// <summary>
/// Managed entry point shim, which starts the actual program
/// </summary>
public static int Main(string[] args)
{
using (PowerShell ps = PowerShell.Create())
{
Console.WriteLine("\nEvaluating 'Get-Command Write-Output' in PS Core Runspace\n");
var results = ps.AddScript("Get-Command Write-Output").Invoke();
Console.WriteLine(results[0].ToString());
}
return 0;
}
}
}