Closed madoxdev closed 5 years ago
Hey @madoxdev,
thanks for your feedback. I have changed the way to get the assembly to support older .NET versions. Please try to install the latest package as soon as it is available.
Is it possible to add .NET Standard 1.3 as a build as well? It would work now in 1.3 but you cannot install it there. Could you consider adding netstandard1.3 as another TargetFramework in .csproj file?
replace that:
<TargetFramework>netstandard2.0</TargetFramework>
with:
`
You want to reference this project in a .NET-Standard 1.3 assembly ? Then upgrade the assembly to use .NET-Standard 2.0 since .NET-461 supports .NET-Standard 2.0 AFAIK.
Can you please provide a repository to reproduce otherwise? I tried it with a NET-461 console application and it was working fine.
461 will be fine. Problem is with 46. I have a quite big project that I am not necessary fancy to risk and upgrade eve to 4.6.1.
But, really if the library can work in 1.3 maybe even 1.1 wouldn't it be better and accessible to a wider audience if it can?
I took your classes and just added them to the project and they work fine, which means they don't use anything that .netstandard 2.0 brought to the framework.
I also like the way when one code can produce two builds in the Nuget package. If you take a look, in bin folder after specifying two TargetFrameworks, dlls are generated twice as well for different runtime. It feels very clean solution .
I have created a pull request, if you would like to take that on board.
If you decide otherwise - that's fine.
I really appreciate the effort but we cannot use a lower version than .NET-Standard 2.0 or .NET-Framework 461 since MediatR itself at least requires that and downgrading MediatR is not an option.
If your project is running on NET46 you can easily upgrade to NET461, there are no breaking changes.
Is there any reason why the package is not available for .NET Standard 1.3? We have a project in .NET Framework 4.6 and would like to use our new library that must be in .NET Standard 1.3 (due to compatibility with .NET Framework 4.6).
We are using MediatR and Autofac, unfortunately, MediatR.Extensions.Autofac.DependencyInjection is not really available.
What we've done is brought the classes from the package to the project and that supposed to do the trick. The only difference is the way the Assembly is get from the type.
builder.RegisterAssemblyTypes(typeof(IMediator).Assembly) .AsImplementedInterfaces();
should be:
builder.RegisterAssemblyTypes(typeof(IMediator).GetTypeInfo().Assembly) .AsImplementedInterfaces();
Is it worth to consider adding support for .NET Standard 1.3?