Xabaril / Esquio

Esquio is a Feature Toggle Library for .NET Developers.
Apache License 2.0
428 stars 49 forks source link

Esquio: Warning: DefaultToggleTypeActivator can't resolve the toggle type Esquio.AspNetCore.Toggles.HostEnvironmentToggle. #200

Closed eyassud closed 2 years ago

eyassud commented 2 years ago

Hello:

I have the settings below, but at runtime the 'HostEnvironmentToggle' is never loaded and thus always returns false for the feature.

I have a basic VS solution that reproduces the issue: See https://github.com/eyassud/EsquioWeApiDemo.git

"Esquio": { "Products": [ { "Name": "default", "Features": [ { "Name": "gpi", "Enabled": true, "Toggles": [ { "Type": "Esquio.AspNetCore.Toggles.HostEnvironmentToggle", "Parameters": { "Environments": "Staging;Development" } } ] } ] } ] }

unaizorrilla commented 2 years ago

Hi @eyassud

Witch version of Esquio? latest?

eyassud commented 2 years ago

Hi @eyassud

Witch version of Esquio? latest?

Yes, the latest .net core version

eyassud commented 2 years ago

Hello:

I have the settings below, but at runtime the 'HostEnvironmentToggle' is never loaded and thus always returns false for the feature.

I have a basic VS solution that reproduces the issue: See https://github.com/eyassud/EsquioWeApiDemo.git

"Esquio": { "Products": [ { "Name": "default", "Features": [ { "Name": "gpi", "Enabled": true, "Toggles": [ { "Type": "Esquio.AspNetCore.Toggles.HostEnvironmentToggle", "Parameters": { "Environments": "Staging;Development" } } ] } ] } ] }

image
unaizorrilla commented 2 years ago

Hi

Please set Type as "Esquio.AspNetCore.Toggles.HostEnvironmentToggle, Esquio.AspNetCore" ie , fully qualified type name!

Let me know if this is working for you!

eyassud commented 2 years ago

Hi

Please set Type as "Esquio.AspNetCore.Toggles.HostEnvironmentToggle, Esquio.AspNetCore" ie , fully qualified type name!

Let me know if this is working for you!

No luck with fully qualified name.

image
unaizorrilla commented 2 years ago

There is not fully qualified use type, assembly like

Esquio.AspNetCore.Toggles.HostEnvironmentToggle, Esquio.AspNetCore

just tested and work a fine!

eyassud commented 2 years ago

There is not fully qualified use type, assembly like

Esquio.AspNetCore.Toggles.HostEnvironmentToggle, Esquio.AspNetCore

just tested and work a fine!

Are you using VS 2022 and .NET 6? Do you have a link to a working example on GitHub?

unaizorrilla commented 2 years ago

Hi!

Just pushed this on MVC Sample

https://github.com/Xabaril/Esquio/blob/master/samples/GettingStarted.AspNetCore.Mvc/appsettings.json

Unai

eyassud commented 2 years ago

Hi!

Just pushed this on MVC Sample

https://github.com/Xabaril/Esquio/blob/master/samples/GettingStarted.AspNetCore.Mvc/appsettings.json

Unai

Thank you very much! It worked.

image