Could not load "Swashbuckle.AspNetCore.SwaggerGen"
See original GitHub issueHi,
I added a Xunit project for my integration tests and now I m not able to generate the services.ts file with nswag studio.
This is the error :
System.IO.FileNotFoundException: Could not load file or assembly ‘Swashbuckle.AspNetCore.SwaggerGen, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d84d99fb0135530a’ or one of its dependencies. The system cannot find the file specified. File name: ‘Swashbuckle.AspNetCore.SwaggerGen, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d84d99fb0135530a’
Server stack trace: at System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes) at System.Reflection.RuntimeAssembly.GetExportedTypes() at NSwag.SwaggerGeneration.WebApi.WebApiToSwaggerGenerator.GetControllerClasses(Assembly assembly) at System.Linq.Enumerable.<SelectManyIterator>d__16
2.MoveNext() at System.Linq.Enumerable.WhereSelectEnumerableIterator
2.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable
1 source) at System.Linq.OrderedEnumerable1.<GetEnumerator>d__1.MoveNext() at System.Linq.Buffer
1…ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable
1 source) at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs) at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at NSwag.SwaggerGeneration.WebApi.WebApiAssemblyToSwaggerGenerator.WebApiAssemblyLoader.GetControllerClasses(String[] assemblyPaths, IEnumerable
1 referencePaths) at NSwag.SwaggerGeneration.WebApi.WebApiAssemblyToSwaggerGenerator.GetControllerClasses() at System.Threading.Tasks.Task
1.InnerInvoke() at System.Threading.Tasks.Task.Execute() — End of stack trace from previous location where exception was thrown — at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at NSwagStudio.ViewModels.SwaggerGenerators.WebApiToSwaggerGeneratorViewModel.<<LoadAssembliesAsync>b__29_0>d.MoveNext() in C:\projects\nswag\src\NSwagStudio\ViewModels\SwaggerGenerators\WebApiToSwaggerGeneratorViewModel.cs:line 127 — End of stack trace from previous location where exception was thrown — at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at MyToolkit.Mvvm.ViewModelBase.<>c__DisplayClass14_0.<<RunTaskAsync>b__0>d.MoveNext() — End of stack trace from previous location where exception was thrown — at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at MyToolkit.Mvvm.ViewModelBase.<RunTaskAsync>d__12`1.MoveNext()WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
I installed the nugget package: “Swashbuckle.AspNetCore.SwaggerGen” in all my project.
Do you know how to resolve this problem?
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Seems to be ok 😃
Please retest with the latest version of NSwag and use a .NET Core runtime…