Steeltoe3.0 AddCloudFoundryConfiguration throws exception

268 Views Asked by At

I have upgraded my app to .net 5 and hence upgraded steeltoe also to 3.0, but when i run the app I get an exception as "could not load type 'steeltoe.extensions.configuration.cloudfoundry.service' from assembly 'steeltoe.extensions.configuration.cloudfoundry base", I am using Steeltoe.Extensions.Configuration.CloudFoundry, I am using serilog too so should I upgrade serilog even, from the past two days I am unable to find the solution for the same.

here is the code snippet


    WebHost.CreateDefaultBuilder(args)
                  .UseEnvironment($"{_environment}")
                  .AddCloudFoundryConfiguration()
                  .UseStartup<Startup>();

1

There are 1 best solutions below

0
Tim On

The Could not load type exception can happen if you have mismatched versions of Steeltoe included in your project. Try making sure all Steeltoe packages are on the same version.