Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to run, it just fails with lot of errors #2

Open
SKApretto71 opened this issue Feb 7, 2017 · 1 comment
Open

Trying to run, it just fails with lot of errors #2

SKApretto71 opened this issue Feb 7, 2017 · 1 comment

Comments

@SKApretto71
Copy link

I'm trying to run the code within the on premise Bot Emulator, as per instructions here:

https://docs.botframework.com/en-us/azure-bot-service/manage/debug/

Even when properly configured on LUIS App ID and Azure Luis Key in the code as instructed, I got lot of interpretation errors as per below.

Trying to run within the Azure Bot service directly, it get into an error that I was hoping to fix locally, but errors are way too much, possibly it's just old code?

=[ERRORS]=====

C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\Bike.csx(27,37): error CS4032: The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task<Task<List>>'.
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\Bike.csx(29,20): error CS0029: Cannot implicitly convert type 'System.Collections.Generic.List' to 'System.Threading.Tasks.Task<System.Collections.Generic.List>'
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\Bike.csx(48,37): error CS4032: The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task<Task>'.
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\Bike.csx(50,20): error CS0029: Cannot implicitly convert type 'GeoLocation' to 'System.Threading.Tasks.Task'
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\Bike.csx(69,37): error CS4032: The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task<Task>'.
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\Bike.csx(71,20): error CS0029: Cannot implicitly convert type 'GeoLocation' to 'System.Threading.Tasks.Task'
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\User.csx(50,37): error CS4032: The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task<Task>'.
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\User.csx(52,20): error CS0029: Cannot implicitly convert type 'User' to 'System.Threading.Tasks.Task'
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\Bike.csx(14,19): warning CS0649: Field 'BikeData.serialnumber' is never assigned to, and will always have its default value null
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\User.csx(21,19): warning CS0649: Field 'User.birthDate' is never assigned to, and will always have its default value null
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\User.csx(22,19): warning CS0649: Field 'User.firstName' is never assigned to, and will always have its default value null
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\User.csx(19,19): warning CS0649: Field 'User.userId' is never assigned to, and will always have its default value null
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\User.csx(18,19): warning CS0649: Field 'User.id' is never assigned to, and will always have its default value null
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\GeoLocation.csx(8,19): warning CS0649: Field 'GeoLocation.latitude' is never assigned to, and will always have its default value 0
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\User.csx(23,19): warning CS0649: Field 'User.lastName' is never assigned to, and will always have its default value null
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\GeoLocation.csx(10,19): warning CS0649: Field 'GeoLocation.name' is never assigned to, and will always have its default value null
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\User.csx(20,19): warning CS0649: Field 'User.gender' is never assigned to, and will always have its default value null
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\GeoLocation.csx(9,19): warning CS0649: Field 'GeoLocation.longitude' is never assigned to, and will always have its default value 0
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\Bike.csx(13,19): warning CS0649: Field 'BikeData.bikeid' is never assigned to, and will always have its default value null
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\User.csx(24,19): warning CS0649: Field 'User.skype' is never assigned to, and will always have its default value null
Function compilation error
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\Bike.csx(27,37): error CS4032: The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task<Task<List>>'.
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\Bike.csx(29,20): error CS0029: Cannot implicitly convert type 'System.Collections.Generic.List' to 'System.Threading.Tasks.Task<System.Collections.Generic.List>'
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\Bike.csx(48,37): error CS4032: The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task<Task>'.
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\Bike.csx(50,20): error CS0029: Cannot implicitly convert type 'GeoLocation' to 'System.Threading.Tasks.Task'
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\Bike.csx(69,37): error CS4032: The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task<Task>'.
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\Bike.csx(71,20): error CS0029: Cannot implicitly convert type 'GeoLocation' to 'System.Threading.Tasks.Task'
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\User.csx(50,37): error CS4032: The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task<Task>'.
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\User.csx(52,20): error CS0029: Cannot implicitly convert type 'User' to 'System.Threading.Tasks.Task'
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\Bike.csx(14,19): warning CS0649: Field 'BikeData.serialnumber' is never assigned to, and will always have its default value null
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\User.csx(21,19): warning CS0649: Field 'User.birthDate' is never assigned to, and will always have its default value null
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\User.csx(22,19): warning CS0649: Field 'User.firstName' is never assigned to, and will always have its default value null
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\User.csx(19,19): warning CS0649: Field 'User.userId' is never assigned to, and will always have its default value null
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\User.csx(18,19): warning CS0649: Field 'User.id' is never assigned to, and will always have its default value null
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\GeoLocation.csx(8,19): warning CS0649: Field 'GeoLocation.latitude' is never assigned to, and will always have its default value 0
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\User.csx(23,19): warning CS0649: Field 'User.lastName' is never assigned to, and will always have its default value null
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\GeoLocation.csx(10,19): warning CS0649: Field 'GeoLocation.name' is never assigned to, and will always have its default value null
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\User.csx(20,19): warning CS0649: Field 'User.gender' is never assigned to, and will always have its default value null
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\GeoLocation.csx(9,19): warning CS0649: Field 'GeoLocation.longitude' is never assigned to, and will always have its default value 0
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\Bike.csx(13,19): warning CS0649: Field 'BikeData.bikeid' is never assigned to, and will always have its default value null
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\User.csx(24,19): warning CS0649: Field 'User.skype' is never assigned to, and will always have its default value null

@SKApretto71
Copy link
Author

SKApretto71 commented Feb 10, 2017

I worked around the above by removing explicit dependencies from AspNet.Core NuGet packages, being required by Bot.Builder 3.3.0, and updating Bot.Builder to the latest stable release.

The code - after few changes on User and Bike csx files to make calls - now compiles just fine, but as I try to test it it fails with following error raised by Autofac:

The requested service 'Microsoft.Bot.Builder.Dialogs.Internals.ConnectorStore' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.

Any hint how to fix it? This happens either on Azure portal as well as on my local debug/emulator machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant