Reputation: 1
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>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<PublishAot>true</PublishAot>
<StripSymbols>true</StripSymbols>
<TrimMode>partial</TrimMode>
</PropertyGroup>
<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.
I tried downgrading Microsoft.Extensions.Configuration, but I get an error given that other projects also refrence it in version 8.0.0. I also tried adding packages that Microsoft.Extensions.Configuration might depend on, but it still did not work.
Upvotes: 0
Views: 16