Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test Tool: Internal Server Error: FileNotFoundException: Could not load file or assembly #594

Closed
alexbaileymembr opened this issue Mar 6, 2020 · 23 comments
Labels
dependencies This issue is a problem in a dependency. feature-request A feature should be added or improved. Lambda-Test-Tool module/lambda-test-tool response-requested Waiting on additional info and feedback. Will move to close soon in 7 days.

Comments

@alexbaileymembr
Copy link

It seems like I'm having an issue that I can't see others coming across. I've checked everything I can think of but no matter what I do, when the lambda test tool opens in the browser, it fails to load the functions list.

In the network tab I can see:

500 Error: http://localhost:5050/webtester-api/Tester/aws-lambda-tools-defaults.json
FileNotFoundException: Could not load file or assembly 'Amazon.Lambda.Serialization.Json, Version=1.0.0.0, Culture=neutral, PublicKeyToken=885c28607f98e604'. The system cannot find the file specified.

Full Stack Trace:

System.IO.FileNotFoundException: Could not load file or assembly 'Amazon.Lambda.Serialization.Json, Version=1.0.0.0, Culture=neutral, PublicKeyToken=885c28607f98e604'. The system cannot find the file specified.

File name: 'Amazon.Lambda.Serialization.Json, Version=1.0.0.0, Culture=neutral, PublicKeyToken=885c28607f98e604'
   at System.Reflection.CustomAttribute._CreateCaObject(RuntimeModule pModule, IRuntimeMethodInfo pCtor, Byte** ppBlob, Byte* pEndBlob, Int32* pcNamedArgs)
   at System.Reflection.CustomAttribute.CreateCaObject(RuntimeModule module, IRuntimeMethodInfo ctor, IntPtr& blob, IntPtr blobEnd, Int32& namedArgs)
   at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes)
   at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType)
   at System.Attribute.GetCustomAttributes(Assembly element, Type attributeType, Boolean inherit)
   at System.Attribute.GetCustomAttribute(Assembly element, Type attributeType, Boolean inherit)
   at Amazon.Lambda.TestTool.Runtime.LocalLambdaRuntime.LoadLambdaFunction(LambdaFunctionInfo functionInfo) in C:\codebuild\tmp\output\src248644039\src\Tools\LambdaTestTool\Amazon.Lambda.TestTool\Runtime\LocalLambdaRuntime.cs:line 125
   at Amazon.Lambda.TestTool.Runtime.LocalLambdaRuntime.LoadLambdaFunctions(IList`1 configInfos) in C:\codebuild\tmp\output\src248644039\src\Tools\LambdaTestTool\Amazon.Lambda.TestTool\Runtime\LocalLambdaRuntime.cs:line 69
   at Amazon.Lambda.TestTool.WebTester.Controllers.TesterController.GetFunctions(String configFile) in C:\codebuild\tmp\output\src248644039\src\Tools\LambdaTestTool\Amazon.Lambda.TestTool\WebTester\Controllers\TesterController.cs:line 34
   at lambda_method(Closure , Object , Object[] )
   at Microsoft.Extensions.Internal.ObjectMethodExecutor.Execute(Object target, Object[] parameters)
   at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.SyncObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeActionMethodAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeNextActionFilterAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()
   at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
   at Amazon.Lambda.TestTool.WebTester.Startup.<Configure>b__6_0(HttpContext context, Func`1 next) in C:\codebuild\tmp\output\src248644039\src\Tools\LambdaTestTool\Amazon.Lambda.TestTool\WebTester\Startup.cs:line 97
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

Has anyone come across this before or can point me in the right direction? There are no errors in the console from me running it and I'm not totally sure where it's going wrong.

Might be worth mentioning that I'm running this on Ubuntu.

@normj
Copy link
Member

normj commented Mar 6, 2020

I'm working on a new version of this tool that is tied with the upcoming .NET Core 3.1 release but also still support .NET Core 2.1. I have been doing some rework to how the Lambda code is loaded. If I provided a link to a preview build would you be willing to try it out.

@alexbaileymembr
Copy link
Author

@normj definitely if it's backwards compatible with 2.1 since I would ideally not want to rework all my functions just yet 😅

@normj
Copy link
Member

normj commented Mar 6, 2020

Yeap, going forward there were be 2 separate tools one for 2.1 and one for 3.1 but they will share a lot of the same logic. Let me clean things up and then I'll add a link to the 2.1 version.

@alexbaileymembr
Copy link
Author

Appreciated thank you

@normj
Copy link
Member

normj commented Mar 7, 2020

Here is a link to a preview build of the upcoming version.

https://normj-packages.s3.us-west-2.amazonaws.com/Amazon.Lambda.TestTool-2.1.0.10.0-preview1.nupkg

To install it download the nupkg file. Then in the directory that you download the file to run the following command to update your existing version.

dotnet tool update -g amazon.lambda.testtool-2.1 --version 0.10.0-preview1 --add-source .

@klaytaybai klaytaybai added dependencies This issue is a problem in a dependency. feature-request A feature should be added or improved. Lambda-Test-Tool labels Mar 9, 2020
@brandon-king-halo
Copy link

We were having trouble with 0.9.5 not loading the netstandard20 version of the NuGet package Microsoft.AspNet.WebApi.Client. Updating to the 0.10.0 preview resolved our issue.

@normj
Copy link
Member

normj commented Mar 10, 2020

@brandon-king-halo Thanks for letting me know that 0.10.0 preview fixes the issue!

@alexbaileymembr
Copy link
Author

Apologies I've not had chance to test this yet. I should be able to look at it this week!

@pcvonz
Copy link

pcvonz commented Mar 12, 2020

FYI If anyone has trouble installing the nupkg locally. Run:

dotnet tool uninstall -g amazon.lambda.testtool-2.1

And then run:

dotnet tool install -g amazon.lambda.testtool-2.1 --version 0.10.0-preview1 --add-source .


@normj
I still get the same exception with the preview release:

System.IO.FileNotFoundException: Could not load file or assembly 'Amazon.Lambda.Serialization.Json, Version=1.0.0.0, Culture=neutral, PublicKeyToken=885c28607f98e604'. The system cannot find the file specified.

File name: 'Amazon.Lambda.Serialization.Json, Version=1.0.0.0, Culture=neutral, PublicKeyToken=885c28607f98e604' ---> System.IO.FileNotFoundException: Could not load the specified file.
File name: 'Amazon.Lambda.Serialization.Json'
   at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingEvent(AssemblyName assemblyName)
   at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingResolvingEvent(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName)
   at System.Reflection.CustomAttribute._CreateCaObject(RuntimeModule pModule, IRuntimeMethodInfo pCtor, Byte** ppBlob, Byte* pEndBlob, Int32* pcNamedArgs)
   at System.Reflection.CustomAttribute.CreateCaObject(RuntimeModule module, IRuntimeMethodInfo ctor, IntPtr& blob, IntPtr blobEnd, Int32& namedArgs)
   at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes)
   at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType)
   at System.Attribute.GetCustomAttributes(Assembly element, Type attributeType, Boolean inherit)
   at System.Attribute.GetCustomAttribute(Assembly element, Type attributeType, Boolean inherit)
   at Amazon.Lambda.TestTool.Runtime.LocalLambdaRuntime.LoadLambdaFunction(LambdaFunctionInfo functionInfo) in C:\codebase\aws-lambda-dotnet\Tools\LambdaTestTool\src\Amazon.Lambda.TestTool\Runtime\LocalLambdaRuntime.cs:line 135
   at Amazon.Lambda.TestTool.Runtime.LocalLambdaRuntime.LoadLambdaFunctions(IList`1 configInfos) in C:\codebase\aws-lambda-dotnet\Tools\LambdaTestTool\src\Amazon.Lambda.TestTool\Runtime\LocalLambdaRuntime.cs:line 79
   at Amazon.Lambda.TestTool.WebTester.Controllers.TesterController.GetFunctions(String configFile) in C:\codebase\aws-lambda-dotnet\Tools\LambdaTestTool\src\Amazon.Lambda.TestTool.WebTester21\Controllers\TesterController.cs:line 29
   at lambda_method(Closure , Object , Object[] )
   at Microsoft.Extensions.Internal.ObjectMethodExecutor.Execute(Object target, Object[] parameters)
   at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.SyncObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeActionMethodAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeNextActionFilterAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()
   at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
   at Amazon.Lambda.TestTool.WebTester.Startup.<Configure>b__6_0(HttpContext context, Func`1 next) in C:\codebase\aws-lambda-dotnet\Tools\LambdaTestTool\src\Amazon.Lambda.TestTool.WebTester21\Startup.cs:line 95
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

@normj
Copy link
Member

normj commented Mar 13, 2020

You mentioned you were doing this on Ubuntu. Have you tried the same solution on anything besides Ubuntu? Wondering if this is a platform specific issue.

@JoelRoxell
Copy link

JoelRoxell commented Apr 15, 2020

Might be related, tried to run using 3.1 and respective Test Tool on ubuntu 19.10.

  1. dotnet new lambda.EmptyFunction --name LinuxFunction
  2. dotnet restore
  3. dotnet build
  4. dotnet lambda-test-tool-3.1 --no-ui

dump:

AWS .NET Core 3.1 Mock Lambda Test Tool (0.10.0)
Loaded local Lambda runtime from project output /home/k/Documents/tmp/LinuxFunction/src/LinuxFunction/bin/Debug/netcoreapp3.1
Executing Lambda function without web interface
Found Lambda config file /home/k/Documents/tmp/LinuxFunction/src/LinuxFunction/aws-lambda-tools-defaults.json
... Using config file /home/k/Documents/tmp/LinuxFunction/src/LinuxFunction/aws-lambda-tools-defaults.json
... Info: function handler LinuxFunction::LinuxFunction.Function::FunctionHandler is not defined in config file.
Unknown error occurred causing process exit: Could not load file or assembly 'Amazon.Lambda.Serialization.SystemTextJson, Version=0.0.0.0, Culture=neutral, PublicKeyToken=885c28607f98e604'. The system cannot find the file specified.

   at System.Reflection.CustomAttribute._CreateCaObject(RuntimeModule pModule, RuntimeType type, IRuntimeMethodInfo pCtor, Byte** ppBlob, Byte* pEndBlob, Int32* pcNamedArgs)
   at System.Reflection.CustomAttribute.CreateCaObject(RuntimeModule module, RuntimeType type, IRuntimeMethodInfo ctor, IntPtr& blob, IntPtr blobEnd, Int32& namedArgs)
   at System.Reflection.CustomAttribute.AddCustomAttributes(ListBuilder`1& attributes, RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder`1 derivedAttributes)
   at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType)
   at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType)
   at System.Reflection.RuntimeAssembly.GetCustomAttributes(Type attributeType, Boolean inherit)
   at System.Attribute.GetCustomAttributes(Assembly element, Type attributeType, Boolean inherit)
   at System.Attribute.GetCustomAttribute(Assembly element, Type attributeType, Boolean inherit)
   at System.Reflection.CustomAttributeExtensions.GetCustomAttribute(Assembly element, Type attributeType)
   at Amazon.Lambda.TestTool.Runtime.LocalLambdaRuntime.LoadLambdaFunction(LambdaFunctionInfo functionInfo) in C:\codebuild\tmp\output\src142363207\src\Tools\LambdaTestTool\src\Amazon.Lambda.TestTool\Runtime\LocalLambdaRuntime.cs:line 141
   at Amazon.Lambda.TestTool.LocalLambdaOptions.LoadLambdaFuntion(LambdaConfigInfo configInfo, String functionHandler) in C:\codebuild\tmp\output\src142363207\src\Tools\LambdaTestTool\src\Amazon.Lambda.TestTool\LocalLambdaOptions.cs:line 54
   at Amazon.Lambda.TestTool.TestToolStartup.LoadLambdaFunction(LambdaConfigInfo configInfo, LocalLambdaOptions localLambdaOptions, CommandLineOptions commandOptions, String lambdaAssemblyDirectory, String lambdaProjectDirectory, RunConfiguration runConfiguration) in C:\codebuild\tmp\output\src142363207\src\Tools\LambdaTestTool\src\Amazon.Lambda.TestTool\TestToolStartup.cs:line 263
   at Amazon.Lambda.TestTool.TestToolStartup.ExecuteWithNoUi(LocalLambdaOptions localLambdaOptions, CommandLineOptions commandOptions, String lambdaAssemblyDirectory, RunConfiguration runConfiguration) in C:\codebuild\tmp\output\src142363207\src\Tools\LambdaTestTool\src\Amazon.Lambda.TestTool\TestToolStartup.cs:line 131
   at Amazon.Lambda.TestTool.TestToolStartup.Startup(String productName, Action`2 uiStartup, String[] args, RunConfiguration runConfiguration) in C:\codebuild\tmp\output\src142363207\src\Tools\LambdaTestTool\src\Amazon.Lambda.TestTool\TestToolStartup.cs:line 82

(Note that it runs "properly" if the assembly reference (LambdaSerializer) is removed, but obviously that's not a solution)

@ericmilaneze
Copy link

Any update on this?

I'm using Fedora 31 (so it's seems not to be a Ubuntu issue as @normj suposed) with amazon.lambda.testtool-3.1 (0.10.0) and I tried the same as @JoelRoxell:

  1. dotnet new lambda.EmptyFunction --name LinuxFunction
  2. dotnet restore
  3. dotnet build
  4. dotnet lambda-test-tool-3.1 --no-ui

This is what I get as a response:

=============================================

AWS .NET Core 3.1 Mock Lambda Test Tool (0.10.0)
Loaded local Lambda runtime from project output /home/eric/code/examples/ex005/LinuxFunction/src/LinuxFunction/bin/Debug/netcoreapp3.1
Executing Lambda function without web interface
Found Lambda config file /home/eric/code/examples/ex005/LinuxFunction/src/LinuxFunction/aws-lambda-tools-defaults.json
... Using config file /home/eric/code/examples/ex005/LinuxFunction/src/LinuxFunction/aws-lambda-tools-defaults.json
... Info: function handler LinuxFunction::LinuxFunction.Function::FunctionHandler is not defined in config file.
Unknown error occurred causing process exit: Could not load file or assembly 'Amazon.Lambda.Serialization.SystemTextJson, Version=0.0.0.0, Culture=neutral, PublicKeyToken=885c28607f98e604'. The system cannot find the file specified.

at System.Reflection.CustomAttribute._CreateCaObject(RuntimeModule pModule, RuntimeType type, IRuntimeMethodInfo pCtor, Byte** ppBlob, Byte* pEndBlob, Int32* pcNamedArgs)
at System.Reflection.CustomAttribute.CreateCaObject(RuntimeModule module, RuntimeType type, IRuntimeMethodInfo ctor, IntPtr& blob, IntPtr blobEnd, Int32& namedArgs)
at System.Reflection.CustomAttribute.AddCustomAttributes(ListBuilder1& attributes, RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder1 derivedAttributes)
at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType)
at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType)
at System.Reflection.RuntimeAssembly.GetCustomAttributes(Type attributeType, Boolean inherit)
at System.Attribute.GetCustomAttributes(Assembly element, Type attributeType, Boolean inherit)
at System.Attribute.GetCustomAttribute(Assembly element, Type attributeType, Boolean inherit)
at System.Reflection.CustomAttributeExtensions.GetCustomAttribute(Assembly element, Type attributeType)
at Amazon.Lambda.TestTool.Runtime.LocalLambdaRuntime.LoadLambdaFunction(LambdaFunctionInfo functionInfo) in C:\codebuild\tmp\output\src142363207\src\Tools\LambdaTestTool\src\Amazon.Lambda.TestTool\Runtime\LocalLambdaRuntime.cs:line 141
at Amazon.Lambda.TestTool.LocalLambdaOptions.LoadLambdaFuntion(LambdaConfigInfo configInfo, String functionHandler) in C:\codebuild\tmp\output\src142363207\src\Tools\LambdaTestTool\src\Amazon.Lambda.TestTool\LocalLambdaOptions.cs:line 54
at Amazon.Lambda.TestTool.TestToolStartup.LoadLambdaFunction(LambdaConfigInfo configInfo, LocalLambdaOptions localLambdaOptions, CommandLineOptions commandOptions, String lambdaAssemblyDirectory, String lambdaProjectDirectory, RunConfiguration runConfiguration) in C:\codebuild\tmp\output\src142363207\src\Tools\LambdaTestTool\src\Amazon.Lambda.TestTool\TestToolStartup.cs:line 263
at Amazon.Lambda.TestTool.TestToolStartup.ExecuteWithNoUi(LocalLambdaOptions localLambdaOptions, CommandLineOptions commandOptions, String lambdaAssemblyDirectory, RunConfiguration runConfiguration) in C:\codebuild\tmp\output\src142363207\src\Tools\LambdaTestTool\src\Amazon.Lambda.TestTool\TestToolStartup.cs:line 131
at Amazon.Lambda.TestTool.TestToolStartup.Startup(String productName, Action`2 uiStartup, String[] args, RunConfiguration runConfiguration) in C:\codebuild\tmp\output\src142363207\src\Tools\LambdaTestTool\src\Amazon.Lambda.TestTool\TestToolStartup.cs:line 82

=============================================

As @JoelRoxell mentioned, it doesn't happen if I comment the following line of code:
[assembly: LambdaSerializer(typeof(Amazon.Lambda.Serialization.SystemTextJson.LambdaJsonSerializer))]

... but it turns out I tried the same on a real project and it started to complain about the Serilog:

System.IO.FileNotFoundException: Could not load file or assembly 'Serilog, Version=2.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10'. The system cannot find the file specified.

Sounds like it's not finding any dependencies.

Does anyone have any idea what's happening here?

@normj
Copy link
Member

normj commented Apr 23, 2020

@ericmilaneze Could you try and experiment for me and in your csproj file add the property CopyLocalLockFileAssemblies with a value of true and see if that changes your behavior?

Here is a full csproj file example.

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netcoreapp3.1</TargetFramework>
    <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
    <AWSProjectType>Lambda</AWSProjectType>
    <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Amazon.Lambda.Core" Version="1.1.0" />
    <PackageReference Include="Amazon.Lambda.Serialization.SystemTextJson" Version="1.0.0" />
    <PackageReference Include="System.Data.SqlClient" Version="4.8.1" />
  </ItemGroup>
</Project>

@rozpuszczalny
Copy link

@normj
I'm facing the same issue that @ericmilaneze is facing. Adding mentioned property solved the problem.
Thank you!

@ericmilaneze
Copy link

It works!

Thanks, @normj!

@carlmiddleton
Copy link

carlmiddleton commented May 8, 2020

@normj we are having a similar issue and get exception 'System.IO.FileLoadException' however slightly different stack trace. We tried adding the property above however did not solve the issue. When deployed to AWS this works fine.

We are using the latest test tool for 2.1 but when we use a nuget package that is built for .NET Standard we get the following error:

System.IO.FileLoadException: Could not load file or assembly 'Internal.Integration.Amy, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. An operation is not legal in the current state. (Exception from HRESULT: 0x80131509)
at Internal.Inventory.Sync.Lambda.Function..ctor()
---------------- Inner 1 Exception ------------
System.InvalidOperationException: Resolved assembly's simple name should be the same as of the requested assembly.
at System.Runtime.Loader.AssemblyLoadContext.ValidateAssemblyNameWithSimpleName(Assembly assembly, String requestedSimpleName)
at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingLoad(AssemblyName assemblyName)
at System.Runtime.Loader.AssemblyLoadContext.Resolve(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName)

Any ideas?

@judedaryl
Copy link

 <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>

Adding this worked for me. Can we add this to the README temporarily?

@cohenalmog
Copy link

    <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>

this is the only thing that solved my issue

@k3nnet
Copy link

k3nnet commented Sep 9, 2020

adding the above mentioned property solved the issue for me as well .

@soccerboymalloy-patriot
Copy link

soccerboymalloy-patriot commented Mar 2, 2021

I'm using version 0.11.1 with a .Net 5 container Lambda. The test tool works fine for me in Visual Studio, but the Rider instructions result in the following error:

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly
'System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
or one of its dependencies. The system cannot find the file specified.

I have <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> in my .csproj

Any thoughts?

EDIT: It turns out I was still version 3.1 of the test tool instead of version 5. I've created #821 to request formal documentation surrounding .Net 5.

@ashishdhingra
Copy link
Contributor

Hi @alexbaileymembr,

Good afternoon.

I was going through backlog and came across this issue. Looks like the issue has been resolved for many users as per comments. Please confirm if this issue could be closed.

Thanks,
Ashish

@ashishdhingra ashishdhingra added the response-requested Waiting on additional info and feedback. Will move to close soon in 7 days. label May 12, 2021
@alexbaileyuk
Copy link

@ashishdhingra sorry about the delay replying. Looks good thanks!

@github-actions
Copy link
Contributor

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies This issue is a problem in a dependency. feature-request A feature should be added or improved. Lambda-Test-Tool module/lambda-test-tool response-requested Waiting on additional info and feedback. Will move to close soon in 7 days.
Projects
None yet
Development

No branches or pull requests