0

Been stuck for several hours trying to use the Mock Lambda test tool for one of my C# Lambda's, 2 machines same issue.. would be great if anyone could help me out..

AWS .NET Core 3.1 Mock Lambda Test Tool (0.10.1)
Unknown error occurred causing process exit: Dependency resolution failed for component C:\Users\Bruno's Dual Boot\Documents\Code\reporting-inbound-service\src\Reporting.Writer.Service.QueueProcessor\bin\Debug\netcoreapp3.1\Reporting.Writer.Service.QueueProcessor.dll with error code -2147450740. Detailed error: Error:
  An assembly specified in the application dependencies manifest (Reporting.Writer.Service.QueueProcessor.deps.json) was not found:
    package: 'Libuv', version: '1.10.0'
    path: 'runtimes/win-x64/native/libuv.dll'

   at System.Runtime.Loader.AssemblyDependencyResolver..ctor(String componentAssemblyPath)
   at Amazon.Lambda.TestTool.Runtime.LambdaAssemblyLoadContext..ctor(String lambdaPath) in C:\codebuild\tmp\output\src782171135\src\Tools\LambdaTestTool\src\Amazon.Lambda.TestTool\Runtime\LambdaAssemblyLoadContext.cs:line 28
   at Amazon.Lambda.TestTool.Runtime.LocalLambdaRuntime.Initialize(String directory, IAWSService awsService) in C:\codebuild\tmp\output\src782171135\src\Tools\LambdaTestTool\src\Amazon.Lambda.TestTool\Runtime\LocalLambdaRuntime.cs:line 71
   at Amazon.Lambda.TestTool.Runtime.LocalLambdaRuntime.Initialize(String directory) in C:\codebuild\tmp\output\src782171135\src\Tools\LambdaTestTool\src\Amazon.Lambda.TestTool\Runtime\LocalLambdaRuntime.cs:line 46
   at Amazon.Lambda.TestTool.TestToolStartup.Startup(String productName, Action`2 uiStartup, String[] args, RunConfiguration runConfiguration) in C:\codebuild\tmp\output\src782171135\src\Tools\LambdaTestTool\src\Amazon.Lambda.TestTool\TestToolStartup.cs:line 77
Press any key to exit
  • Not a lot to go on. What have you tried so far? Does the file it's missing actually exist? – Michel Jansson Nov 21 '20 at 11:46
  • well I have a slight feeling it's more an issue related to the lambda tool itself? and I might need to open a GitHub issue?, because if I run the 2.1 testtool the testtool has no issue's at all.. I'm not really experienced with how this all work under the hood; a colleague of mine resolved this by re-installing the live share extension in VS19, I tried that too but had no luck, also tried to put the dll in system32 and in the path of the lambda tool and some other stackoverflow solutions, just hoping that someone might have had the same issue and by accident sees this post – Bruno Schaatsbergen Nov 21 '20 at 12:07
  • User the version for Core 3.1 from following : https://www.nuget.org/packages/Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv/3.1.4 – jdweng Nov 21 '20 at 13:40
  • @jdweng hmm just tried, unfortunately doesn't seem to solve it – Bruno Schaatsbergen Nov 21 '20 at 13:51
  • did you do a clean build? The compiler doesn't recognize changes to libraries. The copy may of forced some files to get rebuilt. – jdweng Nov 21 '20 at 15:37
  • @jdweng managed to fix it by adding true to csproj that function-handler is pointed too, apparently libuv would not be dumped to bin otherwise – Bruno Schaatsbergen Nov 22 '20 at 00:00

1 Answers1

0

Looks like this resolved the issue (add to .csproj):

https://stackoverflow.com/a/63401132/12657751