Skip to content

Releases

v5.0.0

Choose a tag to compare

@tillig tillig released this 19 Aug 20:54

Breaking Changes

The constructor exception callback now receives the service lifetime scope

RegisterServiceFabricSupport's constructorExceptionCallback parameter changed from Action<Exception> to Action<ILifetimeScope, Exception>, so the callback can resolve dependencies — a logger, for example — from the lifetime scope created for the service that failed to construct. The scope is now disposed after the callback runs rather than before, which is what makes it usable. (#47)

// Before
builder.RegisterServiceFabricSupport(ex => Log(ex));

// After
builder.RegisterServiceFabricSupport((scope, ex) =>
  scope.Resolve<ILogger>().LogError(ex, "Failed to construct service."));

// If you don't need the scope, discard it
builder.RegisterServiceFabricSupport((_, ex) => Log(ex));

Minimum dependency versions raised

Dependency 4.0.0 5.0.0
Autofac 6.0.0 9.3.2
Autofac.Extras.DynamicProxy 6.0.0 8.1.0
Microsoft.ServiceFabric.Services 4.1.458 8.0.0
Microsoft.ServiceFabric.Actors 4.1.458 8.0.0

Service Fabric SDK 8.0.0 requires a cluster runtime of 11.0 or later. The Autofac reference spans three major versions; see the Autofac release notes for what changed there.

Other Changes

  • Optional constructor arguments on services and actors now resolve instead of failing with "None of the constructors found ... can be invoked with the available services and parameters." Every service and actor registration is class-intercepted, and the generated proxy constructor dropped the default values of the parameters it mirrored. Fixed in Autofac.Extras.DynamicProxy 8.1.0. (#41)

  • The assembly no longer declares an x64 platform target. It is pure IL, and marking it x64 meant it could not be loaded in an arm64 process at all. Consumers on Apple Silicon or other ARM hosts can now build and unit test against this package.

  • Service Fabric references are floored at the oldest supported SDK rather than tracking the newest. Your own Service Fabric version now wins, so upgrading Service Fabric no longer waits on a new release of this package, and consumers on an SDK older than the one this package was built against no longer get NU1605 package downgrade errors. Reference the Microsoft.ServiceFabric.* packages you use explicitly and keep them consistent with each other — if you don't reference them at all, you'll silently get the 8.0.0 minimums.

  • Microsoft.ServiceFabric and Microsoft.ServiceFabric.Data are no longer direct dependencies. They continue to arrive transitively through Microsoft.ServiceFabric.Services.

  • The public API is annotated for nullable reference types. Projects with nullable reference types enabled may see new warnings where nullability was previously unexpressed.

  • Retained support for netstandard2.0 and netstandard2.1; no target frameworks were added or removed.

  • Expanded Service Fabric documentation covering the InternalsVisibleTo requirement for internal service types, why components depending on ServiceContext cannot be SingleInstance, the configurationAction hook for registering into the per-service scope, and Service Fabric package version alignment.

v4.0.0

Choose a tag to compare

@alexmg alexmg released this 29 Oct 13:03

This release is an update for compatibility with Autofac 6.0.0 and requires that new version. Autofac 6.0.0 does have some breaking changes - see the Autofac release notes for more information.

  • Fix #57 - Provide hook to add registrations when lifetime scope for service is being created

v3.0.0

Choose a tag to compare

@tillig tillig released this 13 Feb 18:30

This release is an update for compatibility with Autofac 5.0.0 and requires that new version. Autofac 5.0.0 does have some breaking changes - see the Autofac release notes for more information.

  • Minimum .NET Framework updated to .NET 4.6.1.
  • Minimum Autofac 5.1.0.

Thanks @pcherpitel for the PR to get this done!

v2.2.0

Choose a tag to compare

@alexmg alexmg released this 14 Mar 14:21
  • Upgraded Service Fabric packages to 6.4.644.
  • Fixed #48 - Removed ServiceFabricModule as internal components should be registered using RegisterServiceFabricSupport method.

v2.1.0

Choose a tag to compare

@alexmg alexmg released this 27 Oct 13:13
  • Allow logging exceptions during service instantiation.
  • Custom ActorService can be passed to RegisterActor.
  • Lifetime scope tag for actors and services can now be specified during registration.
  • Upgraded Autofac.Extras.DynamicProxy to 4.5.0.
  • Switched from symbol server to SourceLink support.
  • Upgraded Service Fabric packages to 6.3.187.

v2.0.0

Choose a tag to compare

@alexmg alexmg released this 27 Oct 13:10
  • Upgraded projects to .NET Core and targeted netstandard2.0 and net452.
  • Updated dependencies to Service Fabric 6.1.456.
  • Updated Autofac.Extras.DynamicProxy to 4.4.0 release.
  • Explicitly targeted x64 platform for both target frameworks.

v1.0.0

Choose a tag to compare

@alexmg alexmg released this 02 Oct 02:32
  • Updated to Autofac dependency to 4.6.0.
  • Fixed #16: The type System.Fabric.StatefulServiceContext is not assignable to service System.Fabric.StatelessServiceContext.

v1.0.0-beta1

v1.0.0-beta1 Pre-release
Pre-release

Choose a tag to compare

@alexmg alexmg released this 16 May 14:01
  • Fixed #2: Service registrations do not work when made inside Module.
  • Fixed #3: Allow additional ActorService constructor parameters to be passed through from RegisterActor registration method.

v1.0.0-alpha3

v1.0.0-alpha3 Pre-release
Pre-release

Choose a tag to compare

@alexmg alexmg released this 12 Apr 14:50
  • Removed non-generic registration methods.
  • Allow internal service types to be registered if internals are visible to DynamicProxyGenAssembly2.

v1.0.0-alpha2

v1.0.0-alpha2 Pre-release
Pre-release

Choose a tag to compare

@alexmg alexmg released this 05 Apr 13:39
  • Upgraded to Autofac 4.5.0 release package.
  • Removed the need to call separate factory registration methods with IContainer instance after container built.
  • Removed support for scanning based registration of Service Fabric services.