I dont think so. I went through a deps.json file and added the proper values but it didn’t appear to make a difference.
Its strange. The first project I attempted is using the same nugets and works fine. The second one required me to change the architecture but I still end up with
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'Amazon.Lambda.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
2022-12-31T00:35:46.942-05:00 File name: 'Amazon.Lambda.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
2022-12-31T00:35:46.942-05:00 at Amazon.Lambda.RuntimeSupport.RuntimeSupportInitializer.RunLambdaBootstrap()
2022-12-31T00:35:46.942-05:00 at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
2022-12-31T00:35:46.942-05:00 at Amazon.Lambda.RuntimeSupport.RuntimeSupportInitializer.RunLambdaBootstrap()
2022-12-31T00:35:46.942-05:00 at Amazon.Lambda.RuntimeSupport.Program.Main(String[] args) in /src/Repo/Libraries/src/Amazon.Lambda.RuntimeSupport/Program.cs:line 16
2022-12-31T00:35:46.942-05:00 at Amazon.Lambda.RuntimeSupport.Program.<Main>(String[] args)
The other thing I was wondering about was the compile section, is that needed ? I also tried removing that but it didnt make a difference. I was just wondering why its being added ?
No idea ;). this has been there since I added NuGet support; I assume I made it match what VC# did, but this was years ago, so I don’t recall the details. You think I should drop it?
current logic:
if t = "lib" then begin
if not assigned(lJson.Root["runtime"]) then
lJson.Root["runtime"] := new JsonObject;
lJson.Root["runtime"][lRelativePath] := new JsonObject;
var lAssemblyVersion := ElementsCompilerHelpers.GetAssemblyAndFileVersion(Context, f);
lJson.Root["runtime"][lRelativePath]["assemblyVersion"] := lAssemblyVersion[0];
lJson.Root["runtime"][lRelativePath]["fileVersion"] := lAssemblyVersion[1];
end;
if lKind = "Reference" then begin
if not assigned(lJson.Root["compile"]) then
lJson.Root["compile"] := new JsonObject;
lJson.Root["compile"][lRelativePath] := new JsonObject;
end;
I think compile might be relevant for the .deps.json for class libraries?