-
I have a host project that actually hosts 2 services, "apiservice" and "apiservicev2" for example. How can I specify an additional service name for a project that I add to the Basically what I want to do is something like that: var apiservice = builder.AddProject<Projects.ApiService>("apiservice", "apiservicev2"); // implements both at once and references get injected automatically when referenced
var apiservice2 = builder.AddProject<Projects.ApiService2>("apiservice2")
.WithReference(apiservice); // knows about both "apiservice" and "apiservicev2" or var apiservice = builder.AddProject<Projects.ApiService>("apiservice"); // default name is apiservice
var apiservice2 = builder.AddProject<Projects.ApiService2>("apiservice2")
.WithReference(apiservice)
.WithReference(apiservice, name: "apiservicev2"); // explicit custom name I've tried some things but they did not work. It is quite possible that I've missed something in the doc. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 12 replies
-
Can you explain some more? Do you want to declare 2 services or just refer to the same service by a different name? If so can you explain why? |
Beta Was this translation helpful? Give feedback.
There's no first-class support for doing this today but I think you can implement it. This won't work for deployment though, I'll file an issue: