Add sample for global tools (#1288)

This commit is contained in:
Kathleen Dollard 2018-02-26 15:35:56 -08:00 committed by Rich Lander
parent 66e24971a0
commit 7efdad07a5
3 changed files with 77 additions and 0 deletions

View file

@ -0,0 +1,62 @@
using System;
public static class Program
{
public static void Main(string[] args)
{
string message = "dotnet-bot: Welcome to using .NET Core with a global tool!";
if (args.Length > 0)
{
message = String.Join(" ", args);
}
Console.WriteLine(GetBot(message));
}
public static string GetBot(string message)
{
string bot = $"\n {message}";
bot += @"
__________________
\
\
....
....'
....
..........
.............'..'..
................'..'.....
.......'..........'..'..'....
........'..........'..'..'.....
.'....'..'..........'..'.......'.
.'..................'... ......
. ......'......... .....
. ......
.. . .. ......
.... . .......
...... ....... ............
................ ......................
........................'................
......................'..'...... .......
.........................'..'..... .......
........ ..'.............'..'.... ..........
..'..'... ...............'....... ..........
...'...... ...... .......... ...... .......
........... ....... ........ ......
....... '...'.'. '.'.'.' ....
....... .....'.. ..'.....
.. .......... ..'........
............ ..............
............. '..............
...........'.. .'.'............
............... .'.'.............
.............'.. ..'..'...........
............... .'..............
......... ..............
.....
";
return bot;
}
}

View file

@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<PackAsTool>true</PackAsTool>
</PropertyGroup>
</Project>

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="local-packages" value="./nupkg" />
</packageSources>
</configuration>