I have a pipeline for deployment in bitbucket. The last step of my pipeline is:
dotnet lambda deploy-function --region eu-west-1 -pl ./Indexor/Lambdas/Provisioning/src/ --aws-access-key-id "${AWS_ACCESS_KEY_ID}" --aws-secret-key "${AWS_SECRET_ACCESS_KEY}" -fd "Deploy for commit ${BITBUCKET_COMMIT}" -frun provided.al2 -frole arn:aws:iam::476477924141:role/lambda_exec_Provision-0 -ft 30 -fms 4096 -fh "Prov::Prov.Function::FunctionHandler" -farch x86_64 --fn provisioning.
However, I am getting the following error: Failed to load assembly 'Microsoft.Extensions.Configuration'.
I do have this package on my project. Here is the .csproj:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AWSProjectType>Lambda</AWSProjectType>
<AssemblyName>bootstrap</AssemblyName>
<!-- This property makes the build directory similar to a publish directory and helps the AWS .NET Lambda Mock Test Tool find project dependencies. -->
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<!-- Generate Native AOT image during publishing to improve cold start time. -->
<PublishAot>true</PublishAot>
<!-- StripSymbols tells the compiler to strip debugging symbols from the final executable if we're on Linux and put them into their own file.
This will greatly reduce the final executable's size.-->
<StripSymbols>true</StripSymbols>
<!-- TrimMode partial will only trim assemblies marked as trimmable. To reduce package size make all assemblies trimmable and set TrimMode to full.
If there are trim warnings during build, you can hit errors at runtime.-->
<TrimMode>partial</TrimMode>
</PropertyGroup>
<!--
When publishing Lambda functions for ARM64 to the provided.al2 runtime a newer version of libicu needs to be included
in the deployment bundle because .NET requires a newer version of libicu then is preinstalled with Amazon Linux 2.
-->
<ItemGroup Condition="'$(RuntimeIdentifier)' == 'linux-arm64'">
<RuntimeHostConfigurationOption Include="System.Globalization.AppLocalIcu" Value="68.2.0.9" />
<PackageReference Include="Microsoft.ICU.ICU4C.Runtime" Version="68.2.0.9" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Amazon.Lambda.APIGatewayEvents" Version="2.7.1" />
<PackageReference Include="Amazon.Lambda.RuntimeSupport" Version="1.10.0" />
<PackageReference Include="Amazon.Lambda.Core" Version="2.2.0" />
<PackageReference Include="Amazon.Lambda.Serialization.SystemTextJson" Version="2.4.3" />
<PackageReference Include="AWSSDK.Core" Version="3.7.400.5" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Primitives" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Shared\QuickPlatform\src\QuickPlatform.csproj" />
</ItemGroup>
<ItemGroup>
<RdXmlFile Include="rd.xml" />
</ItemGroup>
</Project>
I am using .net8 and the Microsoft.Extensions.Configuration package is also referenced in other projects in the same version. I don't undestand what could be the issue and how can I fix it, so would appreciate some input.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.