LivingDoс generation is failed with error: Exception has been thrown by the target of an invocation.
AnsweredHi all,
all scenarios are completed successfully in Test Explorer - but LivingDoс returns the error:
after execution the CLI:
> livingdoc test-assembly Radiant.Auto.Validation.Steps.dll -t TestExecution.json
Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.IO.FileLoadException: Could not load file or assembly 'Radiant.Auto.Validation.Steps, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
at System.Runtime.Loader.AssemblyLoadContext.LoadFromPath(IntPtr ptrNativeAssemblyLoadContext, String ilPath, String niPath, ObjectHandleOnStack retAssembly)
at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at LivingDoc.CLI.AssemblyLoader.Load(String path) in D:\a\1\s\src\SpecFlow.Integration\LivingDoc.CLI\AssemblyLoader.cs:line 14
at LivingDoc.CLI.ReportGenerator.Generate(GeneratorSource source, Parameters parameters) in D:\a\1\s\src\SpecFlow.Integration\LivingDoc.CLI\ReportGenerator.cs:line 73
at LivingDoc.CLI.ArgumentResolver.Handle(String workingFolder, GeneratorSource source, Parameters parameters) in D:\a\1\s\src\SpecFlow.Integration\LivingDoc.CLI\ArgumentResolver.cs:line 234
at LivingDoc.CLI.ArgumentResolver.<>c__DisplayClass5_0.<Resolve>b__0(Parameters p) in D:\a\1\s\src\SpecFlow.Integration\LivingDoc.CLI\ArgumentResolver.cs:line 176
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.Delegate.DynamicInvoke(Object[] args)
at System.CommandLine.Invocation.ModelBindingCommandHandler.InvokeAsync(InvocationContext context)
at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseParseErrorReporting>b__21_0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass16_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass25_0.<<UseVersionOption>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass23_0.<<UseTypoCorrections>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__22_0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseParseDirective>b__20_0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseDebugDirective>b__11_0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__10_0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass14_0.<<UseExceptionHandler>b__0>d.MoveNext()
What is wrong?
0
-
hey Kovalchuk Anton,
Are you executing the command from the directory where your assembly exists?
0 -
Jordan Western
Yes,The issue was related to Build → Platform target.
For target CPU = x86 - LivingDoс generation will fail.fix back to "Any CPU"
0 -
Hey Kovalchuk Anton,
Thank you for letting me know.
0
Please sign in to leave a comment.
Comments
3 comments