You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Using dotnet core 2.0, while writing some tests that reference a project with a nuget dependency to:
AWSSDK.Extensions.NETCore.Setup (3.3.4),
I get the error that the Microsoft.Extensions.Logging.Abstractions v1.0 assembly cannot be found (callstack further below).
I had a quick look to your code and in my opinion (could be wrong), it might be missing a line in the nuspec (the last dependency line):
After adding this line, recreating the package manually, overwriting the existing version and rebuilding the project, my code simply works. Important: it also works if I just add manually the logging package with a v1.0 to my project, without modifying aws-sdk-net at all. Important2: it also works if I downgrade to: <PackageReference Include="AWSSDK.Extensions.NETCore.Setup" Version="3.3.1" />
instead of 3.3.4 that is the current one.
Expected Behavior
I should not get an error describing a missing assembly when running a project test.
Possible solution above.
Current Behavior
System.IO.FileNotFoundException : Could not load file or assembly 'Microsoft.Extensions.Logging.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.
at Amazon.Extensions.NETCore.Setup.ClientFactory.CreateServiceClient(IServiceProvider provider)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory(FactoryCallSite factoryCallSite, ServiceProvider provider)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2.VisitCallSite(IServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProvider provider) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitSingleton(SingletonCallSite singletonCallSite, ServiceProvider provider) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProvider provider)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2.VisitCallSite(IServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProvider provider) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitSingleton(SingletonCallSite singletonCallSite, ServiceProvider provider) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.<>c__DisplayClass22_0.b__0(ServiceProvider provider)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider)
Possible Solution
Possible solution above.
Steps to Reproduce (for bugs)
Context
Developing a lambda that makes use of SQS and while writing some tests I got this issue.
Your Environment
AWSSDK.Core version used:
AWSSDK.Extensions.NETCore.Setup (3.3.4)
Service assembly and version used:
AWSSDK.Extensions.NETCore.Setup (3.3.4)
Operating System and version:
Windows 10
Visual Studio version:
VS 2017
Targeted .NET platform:
ASP.NET Core 2.0
.NET Core Info
.NET Core version used for development:
.NET Core version installed in the environment where application runs:
Output of dotnet --info:
.NET Command Line Tools (2.1.4)
This is probably because your project is targeting 2.0 and is pulling 2.0 of Microsoft.Extensions.Logging.Abstractions, but NETCore.Setup is looking for 1.0 binaries. We'll take a look at this.
Hi,
Using dotnet core 2.0, while writing some tests that reference a project with a nuget dependency to:
AWSSDK.Extensions.NETCore.Setup (3.3.4),
I get the error that the Microsoft.Extensions.Logging.Abstractions v1.0 assembly cannot be found (callstack further below).
I had a quick look to your code and in my opinion (could be wrong), it might be missing a line in the nuspec (the last dependency line):
After adding this line, recreating the package manually, overwriting the existing version and rebuilding the project, my code simply works.
Important: it also works if I just add manually the logging package with a v1.0 to my project, without modifying aws-sdk-net at all.
Important2: it also works if I downgrade to:
<PackageReference Include="AWSSDK.Extensions.NETCore.Setup" Version="3.3.1" />
instead of 3.3.4 that is the current one.
Expected Behavior
I should not get an error describing a missing assembly when running a project test.
Possible solution above.
Current Behavior
System.IO.FileNotFoundException : Could not load file or assembly 'Microsoft.Extensions.Logging.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.
at Amazon.Extensions.NETCore.Setup.ClientFactory.CreateServiceClient(IServiceProvider provider)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory(FactoryCallSite factoryCallSite, ServiceProvider provider)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor
2.VisitCallSite(IServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProvider provider) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitSingleton(SingletonCallSite singletonCallSite, ServiceProvider provider) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor
2.VisitCallSite(IServiceCallSite callSite, TArgument argument)at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProvider provider)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor
2.VisitCallSite(IServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProvider provider) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitSingleton(SingletonCallSite singletonCallSite, ServiceProvider provider) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor
2.VisitCallSite(IServiceCallSite callSite, TArgument argument)at Microsoft.Extensions.DependencyInjection.ServiceProvider.<>c__DisplayClass22_0.b__0(ServiceProvider provider)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider)
Possible Solution
Possible solution above.
Steps to Reproduce (for bugs)
Context
Developing a lambda that makes use of SQS and while writing some tests I got this issue.
Your Environment
AWSSDK.Core version used:
AWSSDK.Extensions.NETCore.Setup (3.3.4)
Service assembly and version used:
AWSSDK.Extensions.NETCore.Setup (3.3.4)
Operating System and version:
Windows 10
Visual Studio version:
VS 2017
Targeted .NET platform:
ASP.NET Core 2.0
.NET Core Info
dotnet --info
:.NET Command Line Tools (2.1.4)
Product Information:
Version: 2.1.4
Commit SHA-1 hash: 5e8add2190
Runtime Environment:
OS Name: Windows
OS Version: 10.0.15063
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.1.4\
Microsoft .NET Core Shared Framework Host
Version : 2.0.5
Build : 17373eb129b3b05aa18ece963f8795d65ef8ea54
The text was updated successfully, but these errors were encountered: