Ocelot: [Question] ISercviceCollection on Program.cs

Created on 18 Jul 2018  路  3Comments  路  Source: ThreeMammals/Ocelot

Hello, everyone!

I'm trying to update the Ocelot (8.0.0) on my project (From core 2.0 to core 2.1), but I'm stuck in this error:

Program.cs
.ConfigureServices(s => { s.AddOcelot(); })

This line give the following error:
'IServiceCollection' does not contain a definition for 'AddOcelot' and no extension method 'AddOcelot'....

All of my packges are up-to-date.

image

Thanks and sorry for my rusty english.

question

Most helpful comment

@LuketaD2 thanks for your interest in the project!

Try adding

using Ocelot.DependencyInjection;

To your imports and it should work! Let me know if it doesn鈥檛.

All 3 comments

@LuketaD2 thanks for your interest in the project!

Try adding

using Ocelot.DependencyInjection;

To your imports and it should work! Let me know if it doesn鈥檛.

It worked!!!!

All working fine now.

I'm really thankful for your help, Tom.

@LuketaD2 awesome :) no problem.

Was this page helpful?
0 / 5 - 0 ratings