Lambda Mock Test Tool requires a project folder
Describe the bug
Despite now supporting the Executable Assembly project types, in which a console app is responsible for hooking itself up to the lambda event pump, the tool still requires a path to an application folder with a .deps.json file in it.
Expected Behavior
To not need a .deps.json file when running an Executable Assembly style project.
Current Behavior
Fails to start, claiming a need for a .deps.json file.
Reproduction Steps
Run the test tool executable.
Possible Solution
Either add a flag to enable the use case of Executable Assemblies without requiring a path to the .deps.json file, or simply allow that to be the new default mode.
Additional Information/Context
No response
AWS .NET SDK and/or Package version used
dotnet-lambda-test-tool-6.0.exe
Targeted .NET Platform
.NET 6
Operating System and version
Windows 10, Windows 11
Hi @jamesbascle,
Good afternoon.
Thanks for reporting the issue. Could you please add elaborated reproduction steps for your use case?
Thanks, Ashish
Hey Ashish,
I'm not sure what else to write really. I'd expect that since the test tool can now work with Executable Assembly projects, and they are responsible for hooking up to the test tool themselves, rather than being invoked by the test tool, that one would not need to point the test tool at any kind of config files to make use of that functionality.
I can hack around this by pointing it at an entirely unrelated set of config/deps file, then run my project, go to the Executable Assembly part of the UI, and send events to my project.
Does that help?
Hi Ashish,
What does the B label mean?
Would your team accept a pull request to fix this? The status quo makes debugging lambdas locally needlessly complex.
I am also seeing this frustration. However, in my case when running dotnet-lambda-test-tool-6.0.exe in the project I am working on it locks files that are needed to be available when building the lambda function. So I can either run the test tool OR my app.
The current solution is to create a dummy aws-lambda-tools-defaults.json file in another folder and launch the test tool from there, but this isn't ideal.
This is the exact solution I came up with. I created a dummy project and a script to consume it and published it to our "useful scripts" repo that all our devs have. Not an ideal solution, but until this gets attention and fixed I guess it's the best we can do.
Seems pretty strange to have all the fanfare about .net 6 and minimal API and running as a console app etc. and then just...not support that use case at all in the debugging tools.