Questions tagged [dependency-resolver]
71 questions
3
votes
1 answer
LifetimeScoping error in Web API self hosted app and Simple Injector
I read these (+ , + , + and +) pages, but I cannot figure out what should I do.
I have this simple interface and concrete type:
public interface IIdentifierGenerator {
long Generate(Type type);
long Generate(TType type);
}
public…

amiry jd
- 27,021
- 30
- 116
- 215
2
votes
1 answer
How to force sbt to resolve dependencies with scalaVersion compatible with the dependent project
Consider the following contents of some build.sbt and no source code in particular:
lazy val y = (project in file("y"))
.settings(
scalaVersion := "2.11.8",
)
.dependsOn(x)
lazy val x = (project in file("x"))
.settings(
…

jakubdaniel
- 2,233
- 1
- 13
- 20
2
votes
1 answer
Simple Injector registration problem in SignalR
I set DI in my Controller as shown below and tied to register IHubContext as it seen on
Controller:
public class DemoController : Controller
{
private IHubContext context;
public DemoController(IHubContext context)
{
…
user5871859
2
votes
2 answers
Xamarin.Forms DependencyService not for all platforms
In the docs it is clearly stated that you need an implementation for all platforms:
You must provide an implementation in every platform project. If no
Interface implementation is registered, then the DependencyService
will be unable to resolve…

testing
- 19,681
- 50
- 236
- 417
2
votes
1 answer
Intermittent LifetimeScope error: SelfRegistrationCannotBeActivated
I have a scenario which involves a separate LifetimeScope per "session" and long-running resolve in worker thread.
I am getting an erratic error which may have something with timing - it happens when lifetime scopes are disposed / created before…

grzegorz_p
- 483
- 1
- 4
- 14
2
votes
1 answer
ASP.NET Core Custom Validation against database
I am in need of validating field against database possibly using other registered services. I have been reading documentation, but haven't found an actual answer.
There is remote validation that calls to controller method but it is client side only…

Bielik
- 922
- 2
- 14
- 25
1
vote
0 answers
Gradle: A ResolvingStrategy that would behave like Maven's `nearest first`?
I came to set of projects built by Gradle, where upgrading only happens when something stops building, or an infamous CVE appears. Which leads to very wild range of incompatible versions, which just happen not to collide by coincidence (not…

Ondra Žižka
- 43,948
- 41
- 217
- 277
1
vote
1 answer
pip dependency resolver issue - singularity container - cuda and torch
I want to build a singularity container for a python library using the following def file:
Bootstrap: docker
From: nvcr.io/nvidia/pytorch:21.06-py3
%post
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get -y…

Parisa Khateri
- 331
- 2
- 9
1
vote
1 answer
How to use DependencyResolver in Net48 selfhosted application?
I have gotten a task that contains creating a .Net 4.8 application that contains a "HttpSelfHostServer".
I'm stuck in the quest of assigning "IServiceCollection services" to config.DependencyResolver (of type…

Benny Jørgensen
- 35
- 1
- 1
- 5
1
vote
1 answer
How to resolve handler in a clean way
I try to find a simple way to resolve my handlers. The solution is "handling different types of messages". but each solution I found such as this idea, I stuck in resolving the handler because my handler has a constructor which has some dependencies…

ShrnPrmshr
- 353
- 2
- 5
- 17
1
vote
1 answer
How to auto register by matching namespace in Castle Windsor?
I checked many answers and articles before writing this but I wasn't successful.
I want to register all the classes that are derived from 1 particular interface IInject
I have an Interface like this:
public interface IFoo : IInject
{
string…

E-A
- 1,995
- 6
- 33
- 47
1
vote
1 answer
SBT: adding the resolvers of a sbt project to those of the project depending on it
I have a SBT project A published at ../nexus-url/.../a
I have another SBT project B which depends on A and in order to acquire it, it adds ../nexus-url/.../a to its list of resolvers. project B is published to ../nexus-url/.../b
I have another SBT…

Maths noob
- 1,684
- 20
- 42
1
vote
1 answer
Autofac - InstancePerRequest created from DependencyResolver.Current.GetService<>() - When is it released?
In an API controller project in .NET, there is a service I am using, say SomeService, requires one time only initialisation (not per request or per SomeService instance) (Although I do not think it is relevant, here the explanation for this init…

Nuri Tasdemir
- 9,720
- 3
- 42
- 67
1
vote
1 answer
Is Injecting HttpContext by using constructor injection into HttpModule wrong?
I have a custom HttpModule where i trace http requests , part of the implementation is as below ;
private readonly HttpContextBase _httpContext;
private readonly ISessionContext _sessionContext;
public ASHttpModule(HttpContextBase…

naltun
- 114
- 1
- 2
- 12
1
vote
0 answers
Cannot add dependency to "android.support.design.widget.Snackbar" with gradle in Android studio when add new Login activity
I am trying to add an Login activity from Android studio, using New->Activity->Login.
The code contain "import android.support.design.widget.Snackbar;". I tried to build it and got "Cannot resolve symbol'Snackbar'". I added Snackbar to…

Andiana
- 1,912
- 5
- 37
- 73