Visual Studio 2017

Topics on Visual Studio 2017

  • .Net Core,  Microsoft

    Play with dotnet tool and a BOT

    I was poking about with cleaning up my DotNet Core sdks and in my travels a found this thing call dotnet tools… Let the experiment begin… To credit the source of an article on Microsoft go here: dotnet tool  Do a console project with dotnet: dotnet new console -o botsay Then, of course, cd into the botsay directory… and edit the Program.cs (yeap you can do this in VS 2017) Here’s the main method: using System.Reflection; static void Main(string[] args) { if (args.Length == 0) { var versionString = Assembly.GetEntryAssembly() .GetCustomAttribute<AssemblyInformationalVersionAttribute>() .InformationalVersion .ToString(); Console.WriteLine($"botsay v{versionString}"); Console.WriteLine("-------------"); Console.WriteLine("\nUsage:"); Console.WriteLine(" botsay <message>"); return; } ShowBot(string.Join(' ', args)); } The ShowBot method is this:…