Update to .NET 6.0 (updated NuGet packages/APIs)#13
Conversation
vany0114
left a comment
There was a problem hiding this comment.
Hey @houstonhaynes this is great! just left a few comments/questions, looking forward to seeing this working with .Net 6, and thanks for taking the time to contribute to upgrading it!
BTW sorry about the delayed review.
| <SiteUrlToLaunchAfterPublish>https://paymentserviceexternal.azurewebsites.net</SiteUrlToLaunchAfterPublish> | ||
| <LaunchSiteAfterPublish>True</LaunchSiteAfterPublish> | ||
| <ExcludeApp_Data>False</ExcludeApp_Data> | ||
| <<<<<<< HEAD |
There was a problem hiding this comment.
heads up, looks like you forgot to resolve this conflict
There was a problem hiding this comment.
I definitely didn't forget but maybe I forgot a push. I'll go back and take a look and button this up a bit more snugly. I am taking a Windows laptop with me on a working vacation next week so I hope to run "natively" on Service Mesh. I was locked in an AWS VDI at a client site and that hampered things a bit. Once I'm "on metal" I can submit something much more robust.
| .AsImplementedInterfaces(); | ||
|
|
||
| // Register all the event classes (they implement IAsyncNotificationHandler) in assembly holding the Commands | ||
| Autofac.Builder.IRegistrationBuilder<Mediator, Autofac.Builder.ConcreteReflectionActivatorData, Autofac.Builder.SingleRegistrationStyle> registrationBuilder2 = builder.RegisterType<Mediator>().As<IMediator>(); |
There was a problem hiding this comment.
curious if we could get rid of the variable since you're not using it
| Autofac.Builder.IRegistrationBuilder<Mediator, Autofac.Builder.ConcreteReflectionActivatorData, Autofac.Builder.SingleRegistrationStyle> registrationBuilder2 = builder.RegisterType<Mediator>().As<IMediator>(); | |
| builder.RegisterType<Mediator>().As<IMediator>(); |
There was a problem hiding this comment.
I was in "first do no harm" mode - and just wanted it to build/clear all warnings. That was in the info category and can certainly get rid of it.
| .AsClosedTypesOf(typeof(INotificationHandler<>)).AsImplementedInterfaces().InstancePerRequest(); | ||
|
|
||
| builder.Register<SingleInstanceFactory>(context => | ||
| Autofac.Builder.IRegistrationBuilder<ServiceFactory, Autofac.Builder.SimpleActivatorData, Autofac.Builder.SingleRegistrationStyle> registrationBuilder1 = builder.Register<ServiceFactory>(context => |
| }); | ||
|
|
||
| builder.Register<MultiInstanceFactory>(context => | ||
| Autofac.Builder.IRegistrationBuilder<ServiceFactory, Autofac.Builder.SimpleActivatorData, Autofac.Builder.SingleRegistrationStyle> registrationBuilder = builder.Register<ServiceFactory>(context => |
| <ItemGroup> | ||
| <PackageReference Include="GeoCoordinate.NetCore" Version="1.0.0.1" /> | ||
| <PackageReference Include="Kledex.Store.Cosmos.Mongo" Version="2.5.0" /> | ||
| <PackageReference Include="OpenCqrs" Version="6.5.0" /> |
There was a problem hiding this comment.
shouldn't be OpenCqrs.Store.Cosmos.Mongo?
| <TargetFramework>net6.0</TargetFramework> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> |
There was a problem hiding this comment.
curious why you're including the OpenCqrs dependency in the shared kernel? 🤔
| <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
| </PackageReference> | ||
| <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.4" /> | ||
| <PackageReference Include="OpenCqrs" Version="6.5.0" /> |
There was a problem hiding this comment.
ditto, why do we need OpenCqrs dependency here?
There was a problem hiding this comment.
Sorry I have been late getting back to this. OpenCqrs is the replacement for the earlier/deprecated version (Kledex) so I did a find and replace. If there's an entry here where it's not needed I'll nuke it.
| </PackageReference> | ||
| <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.4" /> | ||
| <PackageReference Include="OpenCqrs" Version="6.5.0" /> | ||
| <PackageReference Include="System.Data.SqlClient" Version="4.8.3" /> |
This pull request is a "minimal" code change request - enough to simply get .NET6.0 and compatible libraries to compile/run.