aws / aws-sdk-net

The official AWS SDK for .NET. For more information on the AWS SDK for .NET, see our web site:
http://aws.amazon.com/sdkfornet/
Apache License 2.0
2.07k stars 862 forks source link

Migrating from .Net 6 to .Net 8 #3418

Closed salman-teqocloud closed 3 months ago

salman-teqocloud commented 3 months ago

Describe the bug

I am trying to upgrade my two AWS based Dotnet projects from .net 6 to .net 8 but I am facing same problem in both of those project. One of the project is using CDK and another one is based on SAM. I can build both projects without any problem. But if I do sam build or run dotnet lambda deploy-function I get following error:

Error Detail

... publish: BackendApi -> C:\workspace\BackendApi\bin\Release\net8.0\linux-arm64\BackendApi.dll ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : Error: Failed to load assembly 'AWSSDK.Core' [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : Internal.TypeSystem.TypeSystemException+FileNotFoundException: Failed to load assembly 'AWSSDK.Core' [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.TypeSystem.ThrowHelper.ThrowFileNotFoundException(ExceptionStringID, String) + 0x30 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.TypeSystem.ResolutionFailure.Throw() + 0xf6 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.TypeSystem.Ecma.EcmaModule.GetMethod(EntityHandle) + 0x80 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunVisibilityRootProvider.GetAllMethodImplRecordsForType(EcmaType) + 0x155 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunVisibilityRootProvider.RootMethods(MetadataType, String, IRootingServiceProvider, Boolean) + 0x51 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunVisibilityRootProvider.AddCompilationRoots(IRootingServiceProvider) + 0x12c [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Compilation..ctor(DependencyAnalyzerBase`1, NodeFactory, IEnumerable`1, ILProvider, DevirtualizationManager, IEnumerable`1, Logger, InstructionSetSupport) + 0x143 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunCodegenCompilation..ctor(DependencyAnalyzerBase`1, NodeFactory, IEnumerable`1, ILProvider, Logger, DevirtualizationManager, IEnumerable`1, String, InstructionSetSupport, Boolean, Boolean, Boolean, Boolean, Func`2, String, Boolean, String, Int32, Boolean, Int32, ProfileDataManager, ReadyToRunMethodLayoutAlgorithm, ReadyToRunFileLayoutAlgorithm, Int32, Boolean) + 0x1b5 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunCodegenCompilationBuilder.ToCompilation() + 0x6ac [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Program.RunSingleCompilation(Dictionary`2, InstructionSetSupport, String, Dictionary`2, HashSet`1, ReadyToRunCompilerContext, Logger) + 0x1d23 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Program.Run() + 0x11c6 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Crossgen2RootCommand.<>c__DisplayClass205_0.<.ctor>b__0(ParseResult result) + 0x3e9 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : Error: Failed to load assembly 'AWSSDK.Core' [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : Internal.TypeSystem.TypeSystemException+FileNotFoundException: Failed to load assembly 'AWSSDK.Core' [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.TypeSystem.ThrowHelper.ThrowFileNotFoundException(ExceptionStringID, String) + 0x30 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.TypeSystem.ResolutionFailure.Throw() + 0xf6 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.TypeSystem.Ecma.EcmaModule.GetMethod(EntityHandle) + 0x80 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunVisibilityRootProvider.GetAllMethodImplRecordsForType(EcmaType) + 0x155 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunVisibilityRootProvider.RootMethods(MetadataType, String, IRootingServiceProvider, Boolean) + 0x51 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunVisibilityRootProvider.AddCompilationRoots(IRootingServiceProvider) + 0x12c [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Compilation..ctor(DependencyAnalyzerBase`1, NodeFactory, IEnumerable`1, ILProvider, DevirtualizationManager, IEnumerable`1, Logger, InstructionSetSupport) + 0x143 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunCodegenCompilation..ctor(DependencyAnalyzerBase`1, NodeFactory, IEnumerable`1, ILProvider, Logger, DevirtualizationManager, IEnumerable`1, String, InstructionSetSupport, Boolean, Boolean, Boolean, Boolean, Func`2, String, Boolean, String, Int32, Boolean, Int32, ProfileDataManager, ReadyToRunMethodLayoutAlgorithm, ReadyToRunFileLayoutAlgorithm, Int32, Boolean) + 0x1b5 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunCodegenCompilationBuilder.ToCompilation() + 0x6ac [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Program.RunSingleCompilation(Dictionary`2, InstructionSetSupport, String, Dictionary`2, HashSet`1, ReadyToRunCompilerContext, Logger) + 0x1d23 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Program.Run() + 0x11c6 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Crossgen2RootCommand.<>c__DisplayClass205_0.<.ctor>b__0(ParseResult result) + 0x3e9 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : Error: Failed to load assembly 'AWSSDK.Core' [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : Internal.TypeSystem.TypeSystemException+FileNotFoundException: Failed to load assembly 'AWSSDK.Core' [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.TypeSystem.ThrowHelper.ThrowFileNotFoundException(ExceptionStringID, String) + 0x30 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.TypeSystem.ResolutionFailure.Throw() + 0xf6 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.TypeSystem.Ecma.EcmaModule.GetMethod(EntityHandle) + 0x80 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunVisibilityRootProvider.GetAllMethodImplRecordsForType(EcmaType) + 0x155 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunVisibilityRootProvider.RootMethods(MetadataType, String, IRootingServiceProvider, Boolean) + 0x51 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunVisibilityRootProvider.AddCompilationRoots(IRootingServiceProvider) + 0x12c [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Compilation..ctor(DependencyAnalyzerBase`1, NodeFactory, IEnumerable`1, ILProvider, DevirtualizationManager, IEnumerable`1, Logger, InstructionSetSupport) + 0x143 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunCodegenCompilation..ctor(DependencyAnalyzerBase`1, NodeFactory, IEnumerable`1, ILProvider, Logger, DevirtualizationManager, IEnumerable`1, String, InstructionSetSupport, Boolean, Boolean, Boolean, Boolean, Func`2, String, Boolean, String, Int32, Boolean, Int32, ProfileDataManager, ReadyToRunMethodLayoutAlgorithm, ReadyToRunFileLayoutAlgorithm, Int32, Boolean) + 0x1b5 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunCodegenCompilationBuilder.ToCompilation() + 0x6ac [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Program.RunSingleCompilation(Dictionary`2, InstructionSetSupport, String, Dictionary`2, HashSet`1, ReadyToRunCompilerContext, Logger) + 0x1d23 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Program.Run() + 0x11c6 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Crossgen2RootCommand.<>c__DisplayClass205_0.<.ctor>b__0(ParseResult result) + 0x3e9 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : Error: Failed to load assembly 'AWSSDK.Core' [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : Internal.TypeSystem.TypeSystemException+FileNotFoundException: Failed to load assembly 'AWSSDK.Core' [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.TypeSystem.ThrowHelper.ThrowFileNotFoundException(ExceptionStringID, String) + 0x30 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.TypeSystem.ResolutionFailure.Throw() + 0xf6 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.TypeSystem.Ecma.EcmaModule.GetMethod(EntityHandle) + 0x80 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunVisibilityRootProvider.GetAllMethodImplRecordsForType(EcmaType) + 0x155 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunVisibilityRootProvider.RootMethods(MetadataType, String, IRootingServiceProvider, Boolean) + 0x51 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunVisibilityRootProvider.AddCompilationRoots(IRootingServiceProvider) + 0x12c [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Compilation..ctor(DependencyAnalyzerBase`1, NodeFactory, IEnumerable`1, ILProvider, DevirtualizationManager, IEnumerable`1, Logger, InstructionSetSupport) + 0x143 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunCodegenCompilation..ctor(DependencyAnalyzerBase`1, NodeFactory, IEnumerable`1, ILProvider, Logger, DevirtualizationManager, IEnumerable`1, String, InstructionSetSupport, Boolean, Boolean, Boolean, Boolean, Func`2, String, Boolean, String, Int32, Boolean, Int32, ProfileDataManager, ReadyToRunMethodLayoutAlgorithm, ReadyToRunFileLayoutAlgorithm, Int32, Boolean) + 0x1b5 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunCodegenCompilationBuilder.ToCompilation() + 0x6ac [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Program.RunSingleCompilation(Dictionary`2, InstructionSetSupport, String, Dictionary`2, HashSet`1, ReadyToRunCompilerContext, Logger) + 0x1d23 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Program.Run() + 0x11c6 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Crossgen2RootCommand.<>c__DisplayClass205_0.<.ctor>b__0(ParseResult result) + 0x3e9 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : Error: Failed to load assembly 'AWSSDK.Core' [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : Internal.TypeSystem.TypeSystemException+FileNotFoundException: Failed to load assembly 'AWSSDK.Core' [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.TypeSystem.ThrowHelper.ThrowFileNotFoundException(ExceptionStringID, String) + 0x30 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.TypeSystem.ResolutionFailure.Throw() + 0xf6 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.TypeSystem.Ecma.EcmaModule.GetMethod(EntityHandle) + 0x80 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunVisibilityRootProvider.GetAllMethodImplRecordsForType(EcmaType) + 0x155 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunVisibilityRootProvider.RootMethods(MetadataType, String, IRootingServiceProvider, Boolean) + 0x51 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunVisibilityRootProvider.AddCompilationRoots(IRootingServiceProvider) + 0x12c [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Compilation..ctor(DependencyAnalyzerBase`1, NodeFactory, IEnumerable`1, ILProvider, DevirtualizationManager, IEnumerable`1, Logger, InstructionSetSupport) + 0x143 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunCodegenCompilation..ctor(DependencyAnalyzerBase`1, NodeFactory, IEnumerable`1, ILProvider, Logger, DevirtualizationManager, IEnumerable`1, String, InstructionSetSupport, Boolean, Boolean, Boolean, Boolean, Func`2, String, Boolean, String, Int32, Boolean, Int32, ProfileDataManager, ReadyToRunMethodLayoutAlgorithm, ReadyToRunFileLayoutAlgorithm, Int32, Boolean) + 0x1b5 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunCodegenCompilationBuilder.ToCompilation() + 0x6ac [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Program.RunSingleCompilation(Dictionary`2, InstructionSetSupport, String, Dictionary`2, HashSet`1, ReadyToRunCompilerContext, Logger) + 0x1d23 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Program.Run() + 0x11c6 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Crossgen2RootCommand.<>c__DisplayClass205_0.<.ctor>b__0(ParseResult result) + 0x3e9 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : Error: Failed to load assembly 'AWSSDK.Core' [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : Internal.TypeSystem.TypeSystemException+FileNotFoundException: Failed to load assembly 'AWSSDK.Core' [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.TypeSystem.ThrowHelper.ThrowFileNotFoundException(ExceptionStringID, String) + 0x30 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.TypeSystem.ResolutionFailure.Throw() + 0xf6 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.TypeSystem.Ecma.EcmaModule.GetMethod(EntityHandle) + 0x80 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunVisibilityRootProvider.GetAllMethodImplRecordsForType(EcmaType) + 0x155 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunVisibilityRootProvider.RootMethods(MetadataType, String, IRootingServiceProvider, Boolean) + 0x51 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunVisibilityRootProvider.AddCompilationRoots(IRootingServiceProvider) + 0x12c [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Compilation..ctor(DependencyAnalyzerBase`1, NodeFactory, IEnumerable`1, ILProvider, DevirtualizationManager, IEnumerable`1, Logger, InstructionSetSupport) + 0x143 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunCodegenCompilation..ctor(DependencyAnalyzerBase`1, NodeFactory, IEnumerable`1, ILProvider, Logger, DevirtualizationManager, IEnumerable`1, String, InstructionSetSupport, Boolean, Boolean, Boolean, Boolean, Func`2, String, Boolean, String, Int32, Boolean, Int32, ProfileDataManager, ReadyToRunMethodLayoutAlgorithm, ReadyToRunFileLayoutAlgorithm, Int32, Boolean) + 0x1b5 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunCodegenCompilationBuilder.ToCompilation() + 0x6ac [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Program.RunSingleCompilation(Dictionary`2, InstructionSetSupport, String, Dictionary`2, HashSet`1, ReadyToRunCompilerContext, Logger) + 0x1d23 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Program.Run() + 0x11c6 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Crossgen2RootCommand.<>c__DisplayClass205_0.<.ctor>b__0(ParseResult result) + 0x3e9 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : Error: Failed to load assembly 'AWSSDK.Core' [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : Internal.TypeSystem.TypeSystemException+FileNotFoundException: Failed to load assembly 'AWSSDK.Core' [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.TypeSystem.ThrowHelper.ThrowFileNotFoundException(ExceptionStringID, String) + 0x30 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.TypeSystem.ResolutionFailure.Throw() + 0xf6 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.TypeSystem.Ecma.EcmaModule.GetMethod(EntityHandle) + 0x80 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunVisibilityRootProvider.GetAllMethodImplRecordsForType(EcmaType) + 0x155 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunVisibilityRootProvider.RootMethods(MetadataType, String, IRootingServiceProvider, Boolean) + 0x51 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunVisibilityRootProvider.AddCompilationRoots(IRootingServiceProvider) + 0x12c [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Compilation..ctor(DependencyAnalyzerBase`1, NodeFactory, IEnumerable`1, ILProvider, DevirtualizationManager, IEnumerable`1, Logger, InstructionSetSupport) + 0x143 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunCodegenCompilation..ctor(DependencyAnalyzerBase`1, NodeFactory, IEnumerable`1, ILProvider, Logger, DevirtualizationManager, IEnumerable`1, String, InstructionSetSupport, Boolean, Boolean, Boolean, Boolean, Func`2, String, Boolean, String, Int32, Boolean, Int32, ProfileDataManager, ReadyToRunMethodLayoutAlgorithm, ReadyToRunFileLayoutAlgorithm, Int32, Boolean) + 0x1b5 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunCodegenCompilationBuilder.ToCompilation() + 0x6ac [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Program.RunSingleCompilation(Dictionary`2, InstructionSetSupport, String, Dictionary`2, HashSet`1, ReadyToRunCompilerContext, Logger) + 0x1d23 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Program.Run() + 0x11c6 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Crossgen2RootCommand.<>c__DisplayClass205_0.<.ctor>b__0(ParseResult result) + 0x3e9 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : Error: Failed to load assembly 'AWSSDK.Core' [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : Internal.TypeSystem.TypeSystemException+FileNotFoundException: Failed to load assembly 'AWSSDK.Core' [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.TypeSystem.ThrowHelper.ThrowFileNotFoundException(ExceptionStringID, String) + 0x30 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.TypeSystem.ResolutionFailure.Throw() + 0xf6 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.TypeSystem.Ecma.EcmaModule.GetMethod(EntityHandle) + 0x80 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunVisibilityRootProvider.GetAllMethodImplRecordsForType(EcmaType) + 0x155 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunVisibilityRootProvider.RootMethods(MetadataType, String, IRootingServiceProvider, Boolean) + 0x51 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunVisibilityRootProvider.AddCompilationRoots(IRootingServiceProvider) + 0x12c [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Compilation..ctor(DependencyAnalyzerBase`1, NodeFactory, IEnumerable`1, ILProvider, DevirtualizationManager, IEnumerable`1, Logger, InstructionSetSupport) + 0x143 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunCodegenCompilation..ctor(DependencyAnalyzerBase`1, NodeFactory, IEnumerable`1, ILProvider, Logger, DevirtualizationManager, IEnumerable`1, String, InstructionSetSupport, Boolean, Boolean, Boolean, Boolean, Func`2, String, Boolean, String, Int32, Boolean, Int32, ProfileDataManager, ReadyToRunMethodLayoutAlgorithm, ReadyToRunFileLayoutAlgorithm, Int32, Boolean) + 0x1b5 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunCodegenCompilationBuilder.ToCompilation() + 0x6ac [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Program.RunSingleCompilation(Dictionary`2, InstructionSetSupport, String, Dictionary`2, HashSet`1, ReadyToRunCompilerContext, Logger) + 0x1d23 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Program.Run() + 0x11c6 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Crossgen2RootCommand.<>c__DisplayClass205_0.<.ctor>b__0(ParseResult result) + 0x3e9 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : Error: Failed to load assembly 'AWSSDK.Core' [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : Internal.TypeSystem.TypeSystemException+FileNotFoundException: Failed to load assembly 'AWSSDK.Core' [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.TypeSystem.ThrowHelper.ThrowFileNotFoundException(ExceptionStringID, String) + 0x30 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.TypeSystem.ResolutionFailure.Throw() + 0xf6 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.TypeSystem.Ecma.EcmaModule.GetMethod(EntityHandle) + 0x80 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunVisibilityRootProvider.GetAllMethodImplRecordsForType(EcmaType) + 0x155 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunVisibilityRootProvider.RootMethods(MetadataType, String, IRootingServiceProvider, Boolean) + 0x51 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunVisibilityRootProvider.AddCompilationRoots(IRootingServiceProvider) + 0x12c [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Compilation..ctor(DependencyAnalyzerBase`1, NodeFactory, IEnumerable`1, ILProvider, DevirtualizationManager, IEnumerable`1, Logger, InstructionSetSupport) + 0x143 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunCodegenCompilation..ctor(DependencyAnalyzerBase`1, NodeFactory, IEnumerable`1, ILProvider, Logger, DevirtualizationManager, IEnumerable`1, String, InstructionSetSupport, Boolean, Boolean, Boolean, Boolean, Func`2, String, Boolean, String, Int32, Boolean, Int32, ProfileDataManager, ReadyToRunMethodLayoutAlgorithm, ReadyToRunFileLayoutAlgorithm, Int32, Boolean) + 0x1b5 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunCodegenCompilationBuilder.ToCompilation() + 0x6ac [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Program.RunSingleCompilation(Dictionary`2, InstructionSetSupport, String, Dictionary`2, HashSet`1, ReadyToRunCompilerContext, Logger) + 0x1d23 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Program.Run() + 0x11c6 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Crossgen2RootCommand.<>c__DisplayClass205_0.<.ctor>b__0(ParseResult result) + 0x3e9 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : Error: Failed to load assembly 'AWSSDK.Core' [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : Internal.TypeSystem.TypeSystemException+FileNotFoundException: Failed to load assembly 'AWSSDK.Core' [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.TypeSystem.ThrowHelper.ThrowFileNotFoundException(ExceptionStringID, String) + 0x30 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.TypeSystem.ResolutionFailure.Throw() + 0xf6 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.TypeSystem.Ecma.EcmaModule.GetMethod(EntityHandle) + 0x80 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunVisibilityRootProvider.GetAllMethodImplRecordsForType(EcmaType) + 0x155 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunVisibilityRootProvider.RootMethods(MetadataType, String, IRootingServiceProvider, Boolean) + 0x51 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunVisibilityRootProvider.AddCompilationRoots(IRootingServiceProvider) + 0x12c [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Compilation..ctor(DependencyAnalyzerBase`1, NodeFactory, IEnumerable`1, ILProvider, DevirtualizationManager, IEnumerable`1, Logger, InstructionSetSupport) + 0x143 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunCodegenCompilation..ctor(DependencyAnalyzerBase`1, NodeFactory, IEnumerable`1, ILProvider, Logger, DevirtualizationManager, IEnumerable`1, String, InstructionSetSupport, Boolean, Boolean, Boolean, Boolean, Func`2, String, Boolean, String, Int32, Boolean, Int32, ProfileDataManager, ReadyToRunMethodLayoutAlgorithm, ReadyToRunFileLayoutAlgorithm, Int32, Boolean) + 0x1b5 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunCodegenCompilationBuilder.ToCompilation() + 0x6ac [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Program.RunSingleCompilation(Dictionary`2, InstructionSetSupport, String, Dictionary`2, HashSet`1, ReadyToRunCompilerContext, Logger) + 0x1d23 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Program.Run() + 0x11c6 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Crossgen2RootCommand.<>c__DisplayClass205_0.<.ctor>b__0(ParseResult result) + 0x3e9 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : Error: Failed to load assembly 'AWSSDK.Core' [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : Internal.TypeSystem.TypeSystemException+FileNotFoundException: Failed to load assembly 'AWSSDK.Core' [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.TypeSystem.ThrowHelper.ThrowFileNotFoundException(ExceptionStringID, String) + 0x30 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.TypeSystem.ResolutionFailure.Throw() + 0xf6 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.TypeSystem.Ecma.EcmaModule.GetMethod(EntityHandle) + 0x80 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunVisibilityRootProvider.GetAllMethodImplRecordsForType(EcmaType) + 0x155 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunVisibilityRootProvider.RootMethods(MetadataType, String, IRootingServiceProvider, Boolean) + 0x51 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunVisibilityRootProvider.AddCompilationRoots(IRootingServiceProvider) + 0x12c [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Compilation..ctor(DependencyAnalyzerBase`1, NodeFactory, IEnumerable`1, ILProvider, DevirtualizationManager, IEnumerable`1, Logger, InstructionSetSupport) + 0x143 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunCodegenCompilation..ctor(DependencyAnalyzerBase`1, NodeFactory, IEnumerable`1, ILProvider, Logger, DevirtualizationManager, IEnumerable`1, String, InstructionSetSupport, Boolean, Boolean, Boolean, Boolean, Func`2, String, Boolean, String, Int32, Boolean, Int32, ProfileDataManager, ReadyToRunMethodLayoutAlgorithm, ReadyToRunFileLayoutAlgorithm, Int32, Boolean) + 0x1b5 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunCodegenCompilationBuilder.ToCompilation() + 0x6ac [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Program.RunSingleCompilation(Dictionary`2, InstructionSetSupport, String, Dictionary`2, HashSet`1, ReadyToRunCompilerContext, Logger) + 0x1d23 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Program.Run() + 0x11c6 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Crossgen2RootCommand.<>c__DisplayClass205_0.<.ctor>b__0(ParseResult result) + 0x3e9 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : Error: Failed to load assembly 'AWSSDK.Core' [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : Internal.TypeSystem.TypeSystemException+FileNotFoundException: Failed to load assembly 'AWSSDK.Core' [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.TypeSystem.ThrowHelper.ThrowFileNotFoundException(ExceptionStringID, String) + 0x30 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.TypeSystem.ResolutionFailure.Throw() + 0xf6 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.TypeSystem.Ecma.EcmaModule.GetMethod(EntityHandle) + 0x80 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunVisibilityRootProvider.GetAllMethodImplRecordsForType(EcmaType) + 0x155 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunVisibilityRootProvider.RootMethods(MetadataType, String, IRootingServiceProvider, Boolean) + 0x51 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunVisibilityRootProvider.AddCompilationRoots(IRootingServiceProvider) + 0x12c [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Compilation..ctor(DependencyAnalyzerBase`1, NodeFactory, IEnumerable`1, ILProvider, DevirtualizationManager, IEnumerable`1, Logger, InstructionSetSupport) + 0x143 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunCodegenCompilation..ctor(DependencyAnalyzerBase`1, NodeFactory, IEnumerable`1, ILProvider, Logger, DevirtualizationManager, IEnumerable`1, String, InstructionSetSupport, Boolean, Boolean, Boolean, Boolean, Func`2, String, Boolean, String, Int32, Boolean, Int32, ProfileDataManager, ReadyToRunMethodLayoutAlgorithm, ReadyToRunFileLayoutAlgorithm, Int32, Boolean) + 0x1b5 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunCodegenCompilationBuilder.ToCompilation() + 0x6ac [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Program.RunSingleCompilation(Dictionary`2, InstructionSetSupport, String, Dictionary`2, HashSet`1, ReadyToRunCompilerContext, Logger) + 0x1d23 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Program.Run() + 0x11c6 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Crossgen2RootCommand.<>c__DisplayClass205_0.<.ctor>b__0(ParseResult result) + 0x3e9 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : Error: Failed to load assembly 'AWSSDK.Core' [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : Internal.TypeSystem.TypeSystemException+FileNotFoundException: Failed to load assembly 'AWSSDK.Core' [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.TypeSystem.ThrowHelper.ThrowFileNotFoundException(ExceptionStringID, String) + 0x30 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.TypeSystem.ResolutionFailure.Throw() + 0xf6 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.TypeSystem.Ecma.EcmaModule.GetMethod(EntityHandle) + 0x80 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunVisibilityRootProvider.GetAllMethodImplRecordsForType(EcmaType) + 0x155 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunVisibilityRootProvider.RootMethods(MetadataType, String, IRootingServiceProvider, Boolean) + 0x51 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunVisibilityRootProvider.AddCompilationRoots(IRootingServiceProvider) + 0x12c [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Compilation..ctor(DependencyAnalyzerBase`1, NodeFactory, IEnumerable`1, ILProvider, DevirtualizationManager, IEnumerable`1, Logger, InstructionSetSupport) + 0x143 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunCodegenCompilation..ctor(DependencyAnalyzerBase`1, NodeFactory, IEnumerable`1, ILProvider, Logger, DevirtualizationManager, IEnumerable`1, String, InstructionSetSupport, Boolean, Boolean, Boolean, Boolean, Func`2, String, Boolean, String, Int32, Boolean, Int32, ProfileDataManager, ReadyToRunMethodLayoutAlgorithm, ReadyToRunFileLayoutAlgorithm, Int32, Boolean) + 0x1b5 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunCodegenCompilationBuilder.ToCompilation() + 0x6ac [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Program.RunSingleCompilation(Dictionary`2, InstructionSetSupport, String, Dictionary`2, HashSet`1, ReadyToRunCompilerContext, Logger) + 0x1d23 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Program.Run() + 0x11c6 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Crossgen2RootCommand.<>c__DisplayClass205_0.<.ctor>b__0(ParseResult result) + 0x3e9 [C:\workspace\BackendApi\BackendApi.csproj] ... publish: C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(358,5): error NETSDK1096: Optimizing assemblies for performance failed. You can either exclude the failing assemblies from being optimized, or set the PublishReadyToRun property to false. [C:\workspace\BackendApi\BackendApi.csproj] ERROR: The dotnet publish command return unsuccessful error code

I have already upgraded to latest visual studio, AWS CLI, SAM and AWS tool kit.. Also, I have tried .Net 8.0.303, 8.0.302, 8.0.301 and 8.0.300 But facing same issue. Here is the .csproj code of one of my project:

<Project Sdk="Microsoft.NET.Sdk.Web">
    <PropertyGroup>
        <OutputType>Library</OutputType>
        <TargetFramework>net8.0</TargetFramework>
        <ImplicitUsings>enable</ImplicitUsings>
        <Nullable>enable</Nullable>
        <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
        <AWSProjectType>Lambda</AWSProjectType>
        <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
        <!-- Generate ready to run images during publishing to improvement cold starts. -->
        <PublishReadyToRun>true</PublishReadyToRun>
        <ProduceReferenceAssembly>false</ProduceReferenceAssembly>
        <GenerateProgramFile>false</GenerateProgramFile>
    <SatelliteResourceLanguages>en-US;en</SatelliteResourceLanguages>
    <ResourceLanguages>en</ResourceLanguages>
    </PropertyGroup>
    <PropertyGroup Condition=" '$(RunConfiguration)' == 'Default' ">
      <ExternalConsole>true</ExternalConsole>
    </PropertyGroup>

    <ItemGroup>
        <PackageReference Include="Amazon.Lambda.AspNetCoreServer" Version="9.0.0" />
        <PackageReference Include="Amazon.Extensions.CognitoAuthentication" Version="2.5.5" />
        <PackageReference Include="Amazon.Lambda.Core" Version="2.2.0" />
        <PackageReference Include="Amazon.Lambda.APIGatewayEvents" Version="2.7.1" />
        <PackageReference Include="Amazon.Lambda.Serialization.Json" Version="2.2.2" />
        <PackageReference Include="Amazon.Lambda.Serialization.SystemTextJson" Version="2.4.3" />
        <PackageReference Include="AWSSDK.CloudFormation" Version="3.7.400.2" />
        <PackageReference Include="AWSSDK.CognitoIdentityProvider" Version="3.7.400.2" />
        <PackageReference Include="AWSSDK.EventBridge" Version="3.7.401" />
        <PackageReference Include="AWSSDK.DynamoDBv2" Version="3.7.400.2" />
        <PackageReference Include="AWSSDK.Extensions.NETCore.Setup" Version="3.7.301" />
        <PackageReference Include="AWSSDK.IoT" Version="3.7.400.2" />
        <PackageReference Include="AWSSDK.Lambda" Version="3.7.400.2" />
        <PackageReference Include="AWSSDK.S3" Version="3.7.400.2" />
        <PackageReference Include="AWSSDK.SecretsManager" Version="3.7.400.2" />
        <PackageReference Include="AWSSDK.SecretsManager.Caching" Version="1.0.6" />
        <PackageReference Include="AWSSDK.SimpleEmailV2" Version="3.7.400.2" />
        <PackageReference Include="AWSSDK.TimestreamQuery" Version="3.7.400.2" />
        <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.7" />
        <PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.7" />
        <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.7">
            <PrivateAssets>all</PrivateAssets>
            <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
        </PackageReference>
        <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.7">
            <PrivateAssets>all</PrivateAssets>
            <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
        </PackageReference>
        <PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
        <PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
        <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
        <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
        <PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
        <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.4" />
        <PackageReference Include="Swashbuckle.AspNetCore" Version="6.7.0" />
        <PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.6.2" />
        <PackageReference Include="AWSSDK.IotData" Version="3.7.400.2" />
        <PackageReference Include="AWSSDK.Core" Version="3.7.400.2" />
    </ItemGroup>

</Project>

However, when I set PublishReadyToRun to false then both projects works fine. I have already wasted three days in trying different things but with no success..

Expected Behavior

Projects should works well in .net 8 as it was working in .net 6.

Current Behavior

Project are not to be deployed.

Reproduction Steps

shared above

Possible Solution

No response

Additional Information/Context

No response

AWS .NET SDK and/or Package version used

AWSSDK.Core 3.7.400.2

Targeted .NET Platform

.Net 8

Operating System and version

Windows 11

normj commented 3 months ago

I have taken your project file and tried to reproduce the issue with both dotnet lambda package command and SAM's sam build command and I'm not getting any errors. I assume you tried deleting the bin and obj directories?

salman-teqocloud commented 3 months ago

Yes, i had tried deleting bin, obj, nuget packages, uninstall all dotnet versions, updated aws cli, sam cli, aws toolkit, aws template to latest versions but without vain. My other three team members also didn't have any problems in the projects. It was only me which was having problem. So, I had to go to last option to install fresh windows 11 and that ultimately solved the issue, sam build and dotnet lambda deploy-function commands now work.

ashishdhingra commented 3 months ago

@salman-teqocloud Good morning. Given that you are unblocked and it appeared to be an environmental issue, please confirm if we could close this issue.

Thanks, Ashish

github-actions[bot] commented 3 months ago

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.