Skip to content

Commit

Permalink
Fixes 1218: Welcome Card does not display on non-Windows environments (
Browse files Browse the repository at this point in the history
…#1223)

- use Path.Combine to build file path to welcomeCard.json
  • Loading branch information
sgellock authored Feb 12, 2019
1 parent 478ea75 commit ad2684d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion samples/csharp_dotnetcore/13.basic-bot/BasicBot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit ad2684d

Please sign in to comment.