QnABot source code not compilling in Visual Studios. Missing Program.cs and Startup.cs

AnthonyBot 1 Reputation point
2021-05-21T17:46:26.863+00:00

I'm wanting to create an AI bot so I've spent the last few days working with qnamaker.ai and the azure portal. I've made a few bots last week which I was able to edit and publish with Visual Studios. Yesterday, however, when deciding to restart and create a new bot the new source code wouldn't build in Visual Studios and after close inspection I noticed was missing the Program.cs and Startup.cs files from the zip. Is there anywhere I can get the working source code for my bot?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,961 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
3,621 questions
Developer technologies | C#
{count} votes

2 answers

Sort by: Most helpful
  1. YutongTie-MSFT 53,971 Reputation points Moderator
    2021-05-22T21:18:02.6+00:00

    Hello.

    Could you please share the guidance you are following for your bot?

    This is the code sample repo of our QnABot, if you refer to those, it should work fine: https://github.com/Microsoft/BotBuilder-CognitiveServices/tree/master/CSharp/Samples/QnAMaker

    Regards,
    Yutong

    0 comments No comments

  2. AnthonyBot 1 Reputation point
    2021-05-26T17:06:19.78+00:00

    Hi Yutong,

    I've been following this guide to help me build the bot: https://learn.microsoft.com/en-us/azure/cognitive-services/qnamaker/

    However I noticed I was unable to change the default answer within the azure portal or qnamaker. I then did some digging and found various sources such as this one to help me edit the code within the azure portal: https://stackoverflow.com/questions/58932412/how-to-change-the-default-answer-in-qna-maker

    My issues do not lay with editing or changing the code to have them work but rather the current source code is not correct. Last week I had no issues editing, compiling, and publishing. But suddenly when making a new bot this week the exact same way, I've had issues. The current source code will not only fail to compile in visual studios but also will fail to compile within the azure portal. I've gone through various steps such as creating new knowledge bases and new resource groups but nothing seems to correct the issue of missing key files.

    Thanks


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.