Hello,
After upgrading my .NET 6.0 project from using ServiceStack 6.1.0 to 6.3.0 (from nuget.org), I am encountering the following exception when debugging my project:
System.TypeLoadException: ‘Could not load type ‘ServiceStack.MetadataFeatureExtensions’ from assembly ‘ServiceStack, Version=6.0.0.0, Culture=neutral, PublicKeyToken=null’.’
The stack trace is:
at ServiceStack.ServiceStackHost.OnStartupException(Exception ex)
at ServiceStack.ServiceStackHost.OnStartupException(Exception ex, String target, String method)
at ServiceStack.ServiceStackHost.LoadPluginsInternal(IPlugin[] plugins)
at ServiceStack.ServiceStackHost.OnAfterInit()
at ServiceStack.ServiceStackHost.Init()
at ServiceStack.NetCoreAppHostExtensions.UseServiceStack(IApplicationBuilder app, AppHostBase appHost)
at [MyService].Startup.Configure(IApplicationBuilder app, IWebHostEnvironment env) in [MyService]\Startup.cs:line 51
at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.AspNetCore.Hosting.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder)
at Microsoft.AspNetCore.Hosting.ConfigureBuilder.<>c__DisplayClass4_0.b__0(IApplicationBuilder builder)
at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.Configure(IApplicationBuilder app)
Seeing other similar issues in this forum, I have already tried several steps to fix this problem, including:
- Deleting all /bin and /obj folders in all project folders in the solution
- Deleting my global /packages folder
- Running from the command line: nuget locals all -clear
Nothing I try fixes this problem. Can you recommend any other steps to try? I am at a loss for why this is occurring. Thanks in advance.