Skip to content
Discussion options

You must be logged in to vote

Hi @godefroi,

The new API expects you to move the WithReference call inside the WithDaprSidecar callback, so the reference is added to the sidecar resource rather than the project resource:

var stateStore = builder.AddDaprStateStore("statestore");

builder.AddProject<Projects.ExampleProject>("exampleproject")
       .WithDaprSidecar(sidecar =>
       {
           sidecar.WithReference(stateStore);
       });

The WithDaprSidecar overload that takes an Action<IResourceBuilder<IDaprSidecarResource>> callback gives you a builder scoped to the sidecar resource itself, and WithReference on that builder is the non-obsolete path.

If you need to configure sidecar options at the same time:

builder.A…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@godefroi
Comment options

Answer selected by godefroi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants