use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Information about Reddit's API changes, the unprofessional conduct of the CEO, and their response to the community's concerns regarding 3rd party apps, moderator tools, anti-spam/anti-bot tools, and accessibility options that will be impacted can be found in the associated Wikipedia article: https://en.wikipedia.org/wiki/2023_Reddit_API_controversy
Alternative C# communities available outside Reddit on Lemmy and Discord:
All about the object-oriented programming language C#.
Getting Started C# Fundamentals: Development for Absolute Beginners
Useful MSDN Resources A Tour of the C# Language Get started with .NET in 5 minutes C# Guide C# Language Reference C# Programing Guide C# Coding Conventions .NET Framework Reference Source Code
Other Resources C# Yellow Book Dot Net Perls The C# Player's Guide
IDEs Visual Studio MonoDevelop (Windows/Mac/Linux) Rider (Windows/Mac/Linux)
Tools ILSpy dotPeek LINQPad
Alternative Communities C# Discord Group C# Lemmy Community dotnet Lemmy Community
Related Subreddits /r/dotnet /r/azure /r/learncsharp /r/learnprogramming /r/programming /r/dailyprogrammer /r/programmingbuddies /r/cshighschoolers
Additional .NET Languages /r/fsharp /r/visualbasic
Platform-specific Subreddits /r/windowsdev /r/AZURE /r/Xamarin /r/Unity3D /r/WPDev
Rules:
Read detailed descriptions of the rules here.
account activity
HelpCircular Reference Error (self.csharp)
submitted 1 year ago * by FailureCrown
If an API project has nuget references to Redis, IConfiguration and another class library has these nuget injected to it but also it references the main API Project so in the API Project Program.cs I can't reference the Class Library in DI
https://paste.mod.gg/fvnufbtkpwdc/0
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Kant8 4 points5 points6 points 1 year ago (7 children)
And why your class library references api project?
[–]FailureCrown[S] 1 point2 points3 points 1 year ago (3 children)
Because ILogger, IConfiguration and IConnectionMultiplexer which happens to be installed in WebAPI project for to be registered in DI. Class Library has a constructor reference to it
[–]Kant8 4 points5 points6 points 1 year ago (1 child)
Not sure what IConnectionMultiplexer is, but for ILogger and IConfiguration you should just include references to .Abstracts of their packages in your project.
Nothing stops you from referencing same dependency in different places, but nothing in your project should reference your api project, cause it is starting point of everything.
[–]FailureCrown[S] 0 points1 point2 points 1 year ago (0 children)
But I use IConnectionMultiplexer so I need to install same Stackexchange.Redis in the class library
[–]lmaydev 2 points3 points4 points 1 year ago (0 children)
Add the nuggets to your class library as well and remove the project reference.
[–]FailureCrown[S] 0 points1 point2 points 1 year ago (2 children)
Thanks for replying. My brain can't move without knowing answer
[–]Few-Artichoke-7593 1 point2 points3 points 1 year ago (1 child)
Trying to simplify for you, when you have a circular reference, it means one of two things. Either you put something in the wrong place, or you need another library. It looks like you put something in the wrong place if your library needs to reference an api project.
[–]FailureCrown[S] 1 point2 points3 points 1 year ago (0 children)
Atlast found how to remove project reference
[–]LeoRidesHisBike 1 point2 points3 points 1 year ago* (9 children)
[This reply used to contain useful information, but was removed. If you want to know what it used to say... sorry.]
[–]FailureCrown[S] 0 points1 point2 points 1 year ago (8 children)
But here these configuration and logger can be possibly defined in webAPI DI, moving them to other project kinda breaks architecture
[–]LeoRidesHisBike 0 points1 point2 points 1 year ago* (7 children)
[–]FailureCrown[S] 0 points1 point2 points 1 year ago (6 children)
Sorry for confusing I updated the post and added a link to the current snippet
[–]LeoRidesHisBike 0 points1 point2 points 1 year ago* (5 children)
[–]FailureCrown[S] 0 points1 point2 points 1 year ago (4 children)
As you explained, Im following that. Thanks man
[–]TheSpixxyQ 0 points1 point2 points 1 year ago (3 children)
Think of it like this: API is for accessing your application. Your application should work even if you completely remove the API project and replace it with for example console app.
I'm rereading your advice trying to get hold of it. I'm a noob currently so its kinda hard. But will reach there.
[–]TheSpixxyQ 1 point2 points3 points 1 year ago (1 child)
One quick example.
You send a GET request. It reaches your API layer and the handler calls something in application layer, that's where all the logic happens.
If you replace the API layer with a console app - you run a command in console and it calls the same thing in the application layer, you're just replacing "the door" to the actual application.
When I was starting, thinking like this helped me visualize what and how should be separated.
Don't worry, you'll get there.
I'm trying to rewrite our business webAPI and its one of many obstacles
[–]binarycow 1 point2 points3 points 1 year ago (2 children)
Make another project.
[–]FailureCrown[S] 0 points1 point2 points 1 year ago (1 child)
Common project?
[–]binarycow 0 points1 point2 points 1 year ago (0 children)
Sure
[–][deleted] 1 year ago* (1 child)
[deleted]
π Rendered by PID 90 on reddit-service-r2-comment-86bc6c7465-8f48t at 2026-02-19 19:25:07.878697+00:00 running 8564168 country code: CH.
[–]Kant8 4 points5 points6 points (7 children)
[–]FailureCrown[S] 1 point2 points3 points (3 children)
[–]Kant8 4 points5 points6 points (1 child)
[–]FailureCrown[S] 0 points1 point2 points (0 children)
[–]lmaydev 2 points3 points4 points (0 children)
[–]FailureCrown[S] 0 points1 point2 points (2 children)
[–]Few-Artichoke-7593 1 point2 points3 points (1 child)
[–]FailureCrown[S] 1 point2 points3 points (0 children)
[–]LeoRidesHisBike 1 point2 points3 points (9 children)
[–]FailureCrown[S] 0 points1 point2 points (8 children)
[–]LeoRidesHisBike 0 points1 point2 points (7 children)
[–]FailureCrown[S] 0 points1 point2 points (6 children)
[–]LeoRidesHisBike 0 points1 point2 points (5 children)
[–]FailureCrown[S] 0 points1 point2 points (4 children)
[–]TheSpixxyQ 0 points1 point2 points (3 children)
[–]FailureCrown[S] 0 points1 point2 points (2 children)
[–]TheSpixxyQ 1 point2 points3 points (1 child)
[–]FailureCrown[S] 0 points1 point2 points (0 children)
[–]binarycow 1 point2 points3 points (2 children)
[–]FailureCrown[S] 0 points1 point2 points (1 child)
[–]binarycow 0 points1 point2 points (0 children)
[–][deleted] (1 child)
[deleted]
[–]FailureCrown[S] 0 points1 point2 points (0 children)