Mark
Mark

Reputation: 11

MS Bot framework error 'Activity' namespace not found

I'm using Visual Studio Mac (Beta) to try and get the sample Microsoft Bot framework to run. I've tried to follow all the installation instructions but when running it I get an error saying the type or namespace name 'Activity' cannot be found.

Example usage of it is:- public async Task Post([FromBody]Activity activity)

The inline help suggests I need the System.EnterpriseServices using directive but when I add this I get additional errors so I'm guessing it's not this.

I've not changed the code at all from that downloaded at https://docs.botframework.com/en-us/csharp/builder/sdkreference/gettingstarted.html - so I'm unclear what this might be.

I'm guessing this is related, but under 'References' the System.Web.Entity is greyed out with a message saying 'Assembly not found for framework .net framework 4.6'. I've looked online and I can't see how to resolve this error or download this assembly.

It's been many years so I last coded (and that was Delphi) so it could just be how I've set things up to play with it - any help appreciated.

Upvotes: 1

Views: 1004

Answers (1)

Jason Evans
Jason Evans

Reputation: 29186

Do you have a NuGet reference to Microsoft.Bot.Builder? I think you might need to add that, after which the Activity class can be referenced correctly.

Upvotes: 2

Related Questions