ToastContentBuilder' does not contain a definition for 'Show'

Viewed 2262

I am newbie c# , my first try on Visual Studio Code is to show notification on windows 10 using ToastContentBuilder from Namespace Microsoft.Toolkit.Uwp.Notifications here is my code :

using Microsoft.Toolkit.Uwp.Notifications;

namespace cs
{
class Program
{
    static void Main(string[] args)
    {
     
        new ToastContentBuilder ()
        .AddArgument("action","hello")
        .AddText("my first try in csharp)")
        .Show();
       
    }
}

}

and this is the error :'ToastContentBuilder' does not contain a definition for 'Show' and no accessible extension method 'Show' accepting a first argument of type 'ToastContentBuilder' could be found (are you missing a using directive or an assembly reference?)

3 Answers
Related