From ad2684d685943fcee43df39dfb325ecab2c6baf9 Mon Sep 17 00:00:00 2001 From: Scott Gellock Date: Mon, 11 Feb 2019 18:54:40 -0800 Subject: [PATCH] Fixes 1218: Welcome Card does not display on non-Windows environments (#1223) - use Path.Combine to build file path to welcomeCard.json --- samples/csharp_dotnetcore/13.basic-bot/BasicBot.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/samples/csharp_dotnetcore/13.basic-bot/BasicBot.cs b/samples/csharp_dotnetcore/13.basic-bot/BasicBot.cs index 91d7e9daeb..4acdb9365e 100644 --- a/samples/csharp_dotnetcore/13.basic-bot/BasicBot.cs +++ b/samples/csharp_dotnetcore/13.basic-bot/BasicBot.cs @@ -210,7 +210,9 @@ private Activity CreateResponse(Activity activity, Attachment attachment) // Load attachment from file. private Attachment CreateAdaptiveCardAttachment() { - var adaptiveCard = File.ReadAllText(@".\Dialogs\Welcome\Resources\welcomeCard.json"); + string[] paths = {".", "Dialogs", "Welcome", "Resources", "welcomeCard.json"}; + string fullPath = Path.Combine(paths); + var adaptiveCard = File.ReadAllText(fullPath); return new Attachment() { ContentType = "application/vnd.microsoft.card.adaptive",