0

So in Bot Framework Composer I want to be able to read values from appsettings.json within the .cs of a custom action project. (This is straightforward in BFC itself - see for example this post).

This GitHub post suggests that we just need var botSettings = dc.Parent.State.GetValue("settings");

However that's from some years ago. If I try it in Visual Studio 2022 I get CS0411 "Type arguments cannot be inferred from usage".

I also tried using MyBotProject.Program; but it isn't found. This much upvoted answer says I should right click in Visual Studio and choose the settings tab and change access to MyBotProject from internal to public. But in Visual Studio 2022 I don't have any such tab so I can't see how to do that.

Any suggestions very welcome.

DZW
  • 1
  • 2
  • Hi @DZW I'm confused about the title of the issue and the body of your question. Are you just asking how to retrieve values from appsettings.json within the custom action? Please clarify what the title means and when you are getting the 401/404. – Dana V Apr 05 '23 at 23:40
  • Thanks @dana-v. Apologies. Yes, just asking how to retrieve values from appsettings.json within the custom action. – DZW Apr 28 '23 at 02:01

0 Answers0