Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
23 views

I have used below code to this dependency injection with unity framework along with log4net. Working code snippet: var container = new UnityContainer().RegisterType<ILog>(new InjectionFactory(x =...
Badrinath Ajabe's user avatar
0 votes
1 answer
83 views

I have a question about architecture with Extenject (Zenject). I have a GameStateMachine that is located in the ProjectContext and manages the game states. One of these states (LoadGameState) needs ...
Vladyslav Yeromenko's user avatar
0 votes
0 answers
30 views

I am using Unity container with Prism's BindableBase class, and I suspect that Unity's VirtualMethodInterceptor is altering the behaviour of the SetProperty method in BindableBase. This seems to be ...
Naoki Z's user avatar
0 votes
1 answer
267 views

I am working on an ASP.NET Core application and integrating Swagger with Swashbuckle.AspNetCore. My project uses Unity as the dependency injection (DI) container instead of the default ASP.NET Core DI....
DotNET Developer's user avatar
0 votes
0 answers
50 views

I am working on a shared code base between a client and an ASP.NET Core application. My problem is that ASP.NET Core uses Microsoft.DI and the client uses Prism.Unity, which leads to a log of code ...
Franz's user avatar
  • 476
1 vote
0 answers
74 views

I am working on a old solution web app where all project where created via NET framework. currently we are upgrading all project to NET core, and right now we are moving ASPNET Web App to APSNET Core ...
MIlena Dimitrijevic's user avatar
1 vote
0 answers
928 views

Title: Microsoft.CodeAnalysis.LanguageServer client Error in VS Code: Incorrect dotnet path Body: I'm encountering an issue when trying to run or debug a C# application in Visual Studio Code. The ...
SUMIT KUMAR JHA's user avatar
0 votes
1 answer
34 views

I want to inject all registered implementaions of a base interface as a collection, but I also want to resolve them as more concrete interface implementations. For the collection resolving to work, I ...
Matus's user avatar
  • 437
0 votes
0 answers
35 views

The Facts I have 2 UnityContainers – one (let's call it nested) is registered inside the other (let's call it parent) using RegisterInstance() with a name so it can be resolved by it. // Registration ...
dva's user avatar
  • 361
0 votes
1 answer
42 views

There is an .Net solution that contains .Net 4.7.1 MVC Web App and .Net Core 8.0 Library and Web API. Updated Unity and its related NuGet PAckage as given below. Unity.5.8.5 -> Unity.5.11.10 and ...
user3497702's user avatar
0 votes
1 answer
396 views

I am using Npgsql and EF Core (3.1) in a Net Framework 4.8 application. Due to company infrastructure/policy, I cannot upgrade any higher. I am connecting to the database using an Azure Managed ...
Code Vader's user avatar
0 votes
0 answers
47 views

In my company, we are using Telerik OpenAccess. An extra event is added, every time a dbContext.SaveChanges() is called. A beginning programmer has used this dbContext.SaveChanges() no less than 93 (!!...
Dominique's user avatar
  • 17.6k
2 votes
1 answer
260 views

I am trying to implement a Redis Distributed cache into a Net Framework 4.8 application. I am in the unfortunate position of having to downgrade a solution that was working perfectly fine in Net Core ...
Code Vader's user avatar
0 votes
1 answer
593 views

I am looking at a piece of code in a .NET Core application, and I am wondering if there is an equivalent and elegant way to achieve the result in .NET Framework 4.8 In core, you can "inject" ...
Code Vader's user avatar
1 vote
1 answer
134 views

I am trying to increase the unit test coverage of an application and ran into an issue with mocking the child class of a base class that is injected into the class I'm trying to test. I am trying to ...
Brett's user avatar
  • 75
1 vote
2 answers
442 views

I am new to IOC containers and i am trying to understand how to use them. I understand the concept but I having issues on how to practically apply it. Currently, I am using Unity ioc container to ...
Jean's user avatar
  • 47
0 votes
1 answer
43 views

I work with .Net Framework 4.7 and UnityDependencyResolver. My customer write a constructor with an Enum as the parameter and UnityDependencyResolver cannot initialize this constructor. I guess the ...
DucHo's user avatar
  • 134
1 vote
0 answers
76 views

I'm trying to find the best approach for a logic that is supposed to retrieve data from different sources and combine them into a JSON object. I was able to make it work by serializing the results of ...
Arturio's user avatar
  • 496
0 votes
1 answer
57 views

I am using .NET 4.8. and I registered Microsoft.Logger with unity injection: var factory = new LoggerFactory(); factory.AddLog4Net("log4net.config"); container.RegisterInstance<...
pakerinjo's user avatar
2 votes
1 answer
414 views

I have a Worker with logger and the project is throwing an error: Resolution of the dependency failed, type = "Test.IWorker", name = "(none)" public class SimpleWorker : IWorker { ...
pakerinjo's user avatar
0 votes
0 answers
458 views

I am working on a legacy ASP.NET application with target framework .NET 4.7.2. There is already a Unity container implemented (using Microsoft.AspNet.WebFormsDependencyInjection.Unity v1.0.0). Now, I ...
Mahesh's user avatar
  • 420
0 votes
1 answer
66 views

I'm attempting to be able to use multiple db connections in different repositories and am following this answer. I am on .NET Framework 4.8 so things are a little different but everything has been ...
Dev 404's user avatar
  • 1,616
0 votes
2 answers
657 views

I have a shared Code between my backend and my frontend(WPF), where be backend currently uses NReco.Logging.File which is compatible with Microsoft.Extensions.Logging.ILogger. But in the fronend, I ...
Franz's user avatar
  • 476
-4 votes
1 answer
214 views

I installed the Unity Hub. But one error message appears while running the program. How can I solve this problem ? I cannot hold on my works because of this problem.
Sezgin Karagülle's user avatar
3 votes
1 answer
648 views

I'm trying to migrate from .NET3.1 to .NET6.0 WebAPI. I read this as manual to do this migration. I'm using UnityContainer as DependencyInjection framework. So in .NET3.1 I have something like this: ...
RezaNoei's user avatar
  • 1,509
0 votes
1 answer
123 views

As you can see in C# Unity container, we can configure a container (a list of dependency and object creation policy) from a file, and it is very good when, I want change a dependency (backend for ...
sorosh_sabz's user avatar
  • 3,053
0 votes
0 answers
361 views

I'm trying to use Microsoft extension logging in ASP.NET MVC 5 with dependency injection using Unity but its not showing any logs in the console. Here are my complete code, Global.asax.vb: Sub ...
Ris's user avatar
  • 1,184
0 votes
0 answers
108 views

I am attempting to convert the below unity container registration into an AutoFac container container.RegisterType<C1Context>(new HierarchicalLifetimeManager()); container.RegisterFactory<...
DrollDread's user avatar
1 vote
1 answer
691 views

Despite Unity container being deprecated, unfortunately I find myself having to use it since the current wpf codebase I'm working on has been dependent on it for years. On the server side, I'm able to ...
user3613025's user avatar
0 votes
1 answer
69 views

I'm updating a legacy codebase which was using Unity 3.5 for dependency injection. It's using a custom extension to set the default LifetimeManager, in much the same way as this stackflow question. ...
DBPaul's user avatar
  • 580
0 votes
1 answer
261 views

I'm currently making a game that replays the player in reverse. Is there a way to make the player animation play in reverse smoothly? For now, animation is recorded every 0.02 seconds, and when ...
jinwoo11037's user avatar
0 votes
1 answer
99 views

I would like to move away from the Unity NuGet package for Dependency Injection and switch to Ninject since Unity is no longer being maintained. I was wondering if someone might be able to help me ...
ADH's user avatar
  • 3,081
0 votes
0 answers
94 views

I have a unity container with a number of registrations. I then create a child container and add some more registrations. The child container is meant to contain a specific group of registrations ...
Flack's user avatar
  • 5,939
2 votes
1 answer
302 views

I am trying to understand how do I resolve multiple parameters being passed to a constructor from a DI container. I have an interface IDataAccess (#1) and a class called SQL implementing IDataAccess (#...
Prasanth Sarath's user avatar
1 vote
2 answers
351 views

We are transitioning from Xamarin.Forms to .Net MAUI but our project uses Prism.Unity.Forms. We have a lot of code that basically uses the IContainer.Resolve() passing in a collection of ...
mnx's user avatar
  • 11
1 vote
1 answer
230 views

I want to improve my WPF Prism App by using a MediatR Pipelining. But my Pipline "LoggingBehavior" ist not triggert. The setup of the pipelin in the DI Contianer settings: ...
Peter Krämer's user avatar
0 votes
2 answers
404 views

Package manager error every time I create a new project in Unity occurs. I'm removing the error from the package manager, but it's inconvenient to get the error every time I create a project. How can ...
임서현's user avatar
2 votes
0 answers
77 views

I'm using unity as IoC container, and I'm using SignalR. This is how I configure SignalR, in Startup.cs, inside the Configure method app.Map("/signalr", map => { ...
Oscar Cabrera Rodríguez's user avatar
0 votes
0 answers
349 views

Web API C# .NET Framework 4.7.2 Unfortunately it is not possible to use NET CORE. I have to do something a lot like: Configure HttpClientFactory to use data from the current request context my ...
Fede's user avatar
  • 7
0 votes
2 answers
443 views

my problem I am on windows 10 I tried reinstalling .net multiple times and re installed VS Code I am really desperate for solutions now
Rick's user avatar
  • 1
1 vote
1 answer
278 views

I am using ServiceStack (5.12.0) in my ASP.NET service along with Unity Container. I am registering instances of same type as follows public static IUnityContainer Create() { container....
A_0's user avatar
  • 1,004
4 votes
1 answer
3k views

I am migrating my .NET applications Dependency Injection framework from Unity Container to Microsoft.Extensions.DependencyInjection. Now I did not find a way to register an already existing instance ...
clamp's user avatar
  • 34.2k
1 vote
0 answers
266 views

I am new developer using C# and I am working on a project which uses C# Unity for Dependency Injection. So the current code is like this ISomeInterface var = new SomeConcreteType(param); ...
Vic's user avatar
  • 11
0 votes
0 answers
229 views

I'm trying to integrate Dependency Injection with Unity.MVC to my project. With the default configuration that Unity has, controllers works perfectly fine but I would like to implement DI en other ...
Egon's user avatar
  • 25
1 vote
0 answers
599 views

I am converting my Xamarin Forms Application to dotnetMAUI. In Xamarin I've used Unity Container for dependency injection. Is Unity Container supported in dotnet MAUI?
Mars's user avatar
  • 339
1 vote
1 answer
59 views

I'm currently using Prism with Unity in a Xamarin.Forms project. I'm using protected override void RegisterTypes(IContainerRegistry containerRegistry) {} to register my classes in App.xaml.cs, but as ...
T-Rev's user avatar
  • 172
0 votes
1 answer
124 views

I'm trying to consolidate some code in an old .NET 4.0 project using UnityContainer for DI. I have the following list of registrations, which are lazy loaded, with a constructor injection in a Unity ...
Rebecca's user avatar
  • 14.5k
0 votes
0 answers
729 views

I have the following problem: I am coding a Windows service using a console app project and Topshelf nuget . I am using Unity container to implement DI. Additionally, I would like to log the Windows ...
bodzio05's user avatar
0 votes
1 answer
87 views

Hi I am getting "cd "c:\Users\UMUT\Desktop\Unity Projects\Newest\Assets" ; if ($?) { dotnet run $Player_Movement }" message and I get this error message "Couldn't find a ...
a python learner's user avatar
0 votes
1 answer
48 views

I just got my unity config working, I started playing with web.config transformers and now it won't stop returning the base type. I've stepped through the code to confirm the mapto value being picked ...
TheFunVampire's user avatar

1
2 3 4 5
78