Use These 4 Best Practices For Your .NET Project Setup

  Рет қаралды 42,029

Milan Jovanović

Milan Jovanović

Күн бұрын

Пікірлер: 91
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Get the source code for this video for FREE → the-dotnet-weekly.ck.page/project-setup Want to master Clean Architecture? Go here: bit.ly/3PupkOJ Want to unlock Modular Monoliths? Go here: bit.ly/3SXlzSt
@PsiBurr
@PsiBurr Жыл бұрын
As a solo remote developer with never enough time to research, I find your videos incredibly useful. Thanks Milan!
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
I'm glad you find value in my videos 😁
@bilallilla3990
@bilallilla3990 6 ай бұрын
Mentor = Milan's videos.
@dev.gustavo
@dev.gustavo 8 ай бұрын
This channel is worth a million dollars!
@MilanJovanovicTech
@MilanJovanovicTech 8 ай бұрын
Where can I sell it for that much? 😅 Just kidding, I enjoy this too much...
@AdamsterDomi
@AdamsterDomi Жыл бұрын
Great video, if you could do more this type of videos, of how things should be in production, this would be great, cause youtube is full of tutorials how to do something, but only covering the "hello-world" part, and not the how things should be in long term perspective, and of course thank you, for this one
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Long term, what I just showed is pretty stable. And most of the stuff I show is "production ready" if I dare say that
@compman73
@compman73 Жыл бұрын
I usually watch copule of resources for each topic from different developers and I pick the best or mix top 2 or 3 for my projects. Yours is one of the best to follow I like the way you organize your code Thank you so much Milan🌹
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Thank you so much, Alireza, I'm glad my videos are helpful to you!
@phw1009
@phw1009 Жыл бұрын
I have been thorugh quiet a lot of youtuber. but you are the best Csharp tutor.
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Wow, thanks! I'm honestly humbled :)
@ertackosucu
@ertackosucu Жыл бұрын
short, clear and perfect explanation, thank you
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Glad you liked it!
@SvendKoustrup
@SvendKoustrup Жыл бұрын
Really consice video, great stuff! Could you make a "part two" for when you have been developing in this development environment, and then needs to publish it, how to 'shred' all the environment stuff?
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Good idea!
@SvendKoustrup
@SvendKoustrup Жыл бұрын
@@MilanJovanovicTech Looking forward to it ;-)
@federicogauna738
@federicogauna738 Жыл бұрын
Clear and concise. Thanks for sharing Milan!
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Glad it was helpful!
@kodindoyannick5328
@kodindoyannick5328 8 ай бұрын
Very clear. Thank you Milan for these best partices
@MilanJovanovicTech
@MilanJovanovicTech 8 ай бұрын
You're most welcome!
@ignacioinnovo5308
@ignacioinnovo5308 9 ай бұрын
Very useful video Milan! Thank you very much! Keep working like this, you are awesome!
@MilanJovanovicTech
@MilanJovanovicTech 9 ай бұрын
Thanks, will do!
@zimpoooooo
@zimpoooooo Жыл бұрын
Giving a like for showing the four things in the thumbnail :p
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Gotta deliver on the promise 😁
@justtomi-qp8qj
@justtomi-qp8qj Жыл бұрын
Compact and nicely crafted! Thanks for sharing!
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Thank you! Cheers!
@m5s10
@m5s10 Жыл бұрын
We use 3/4 on our project, not bad :) We don't use docker at the moment, there's no need. But kudos for making the video, these are some nice practices to do to keep the code quality high.
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
As I said, I mostly use it for a stable local dev environment across the team. Although we do run containers in production.
@EduardoSpaki
@EduardoSpaki Жыл бұрын
setting up dockerfile into project, when you have projects depencies among projects in the solution, can be trick... the way I found to avoid problems is setting docker file out of project, in the solution root folder
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Ah, nice suggestion
@davearkley7014
@davearkley7014 Жыл бұрын
Nice Milan, Perhaps a follow up video on how to build a VS template which would automate this
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Great idea!
@roberteru25
@roberteru25 Жыл бұрын
I prefer cli template, I already did for a ddd codebase
@Abushalabi
@Abushalabi Жыл бұрын
Amazing tips Milan. Thanks for sharing
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
My pleasure!
@CRBarchager
@CRBarchager Жыл бұрын
Very nice setup, Milan. I thnk I'll introduce the editorconfig section to my team. I use much of the same setup already though we're not at the Docker stage yet but it's in the works. We use over own logging package but it is using Serilog underneath to log to ElastickSearch. Sonar is also in place but as a extention in VS. I might add it to our Templates when creating new projects.
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Pretty cool! I hope some of this can help your team write more consistent code :)
@ilyas7610
@ilyas7610 Жыл бұрын
Amazing please make video on PDF and Excel reports generation
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
I doubt that's an exciting topic 😅
@xBalaDeCanhaox
@xBalaDeCanhaox Жыл бұрын
Hey Milan how are you? Assuming your editorconfig file is better than the one I use ate work, is there any chance you share it with us ? Any rule you wouldn't live without? lol Thanks.
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Here's one: gist.github.com/m-jovanovic/417b7d0a641d7dd7d1972550fba298db
@xBalaDeCanhaox
@xBalaDeCanhaox Жыл бұрын
@@MilanJovanovicTech Thank you so much Milan!!
Жыл бұрын
With editorconfig there might be issues on a team, since Visual Studio, dotnet cli, VS + ReSharper, and Rider, might read the rules very different. At least it used to be like that. The fix is then to do this analysis in the build pipelines, and use that as a truth for the rules.
@Lammot
@Lammot Жыл бұрын
Main issue is that code styling rules can have severity set up in 2 places: by IDEXXXX code and by the option itself. I believe rider tends to prefer the options while build is supposed to reference IDEXXXX. Maybe VS also prefers IDE codes as well. Other than that, it seems to work good enough in any editor thanks to the fact that analyzers are part of the compiler.
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
It would definitely be strange if they read the same rules differently
@andrewstevens7764
@andrewstevens7764 Жыл бұрын
I would happily drop stylecop as ours is conflicting with the editor config and the editor config seems to be able to do most of the stuff needed
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
There are some code quality checks that the editorconfig doesn't cover
@mohamed-hassan-
@mohamed-hassan- Жыл бұрын
Thanks for this fruitful video
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
It's my pleasure
@Tymonello
@Tymonello Жыл бұрын
Does this SonarAnalyzer nuget package do the same thing as SonarLint extension to Visual Studio?
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Kind of, but it's not a linter
@ghkpr
@ghkpr Жыл бұрын
Thanks for the awesome tutorials. Do I have to add the same editorconfig to each project, or can I define it somehow in the solution level?
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Solution level will cover all the projects inside And if you have one on project level, it overrides the solution level one
@ghkpr
@ghkpr Жыл бұрын
@@MilanJovanovicTech Great, thanks! :)
@stoic2454
@stoic2454 Жыл бұрын
Also what are you view on using regions, i really like it coz segregates my code but ppl comsider them antipattern i just dont get it
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
I have a disdain for regions - they obscure code and makes it less readable
@zagoskintoto
@zagoskintoto Жыл бұрын
A totally random question. How do you configure the colors for the text in files like your .editorconfig? mine is all white whereas yours has green comments, recognizes the blue config name and the text to the right as white.
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
I probably just used a different editor in VS
@alexmadnix
@alexmadnix Жыл бұрын
Tnanks for Milan^^
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
You're welcome!
@hirenvadher2610
@hirenvadher2610 Жыл бұрын
Thanks for creating this. Just a request If you could provide us the.editorconfig file, it would be helpful.
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
gist.github.com/m-jovanovic/417b7d0a641d7dd7d1972550fba298db
@Eddyi0202
@Eddyi0202 Жыл бұрын
Is there some advantage for using Sonar nuget vs IDE extension?
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Also works in build pipelines, where you don't have an IDE
@GreenLedger
@GreenLedger 8 ай бұрын
Hi Milan, how can we add custom rules in editorconfig. Such as “should have one line space between methods”, “should not have unwanted spaces”
@MilanJovanovicTech
@MilanJovanovicTech 8 ай бұрын
I'd start by exploring the MSFT docs for that, I don't know it by heart
@abdulnaserramadan37
@abdulnaserramadan37 Жыл бұрын
Great video, thank you.
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Glad you liked it!
@alexandrelima2495
@alexandrelima2495 Жыл бұрын
Great video! Which VS theme are you using?
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
VS dark theme + R# syntax highlighting
@mohammedahmedbadee9846
@mohammedahmedbadee9846 Жыл бұрын
Thanks Milan, appreciate it, but I think this boilerplate should be automated with project creation
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Agreed, that'd be great
@mrohailiqbal
@mrohailiqbal Жыл бұрын
really useful info. Thanks
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Glad it was helpful!
@vivekkaushik9508
@vivekkaushik9508 Жыл бұрын
Very handy.
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Thanks!
@stoic2454
@stoic2454 Жыл бұрын
what do i do for code-styles like blank lines new lines indentation, i’m sick of my team mates bombarding my pr with with these styles
@PanzerFaustFurious
@PanzerFaustFurious Жыл бұрын
Csharpier is great for this imo
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Here's the extension for what the above comment references: marketplace.visualstudio.com/items?itemName=csharpier.CSharpier
@rezarfm637
@rezarfm637 Жыл бұрын
Perfect 👍
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Thanks 👍
@nanvlad
@nanvlad Жыл бұрын
What about Roslynator instead of SonarAnalyzer?
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
I haven't tried it, but seems to be the same thing more or less. What's your experience?
@nanvlad
@nanvlad Жыл бұрын
@@MilanJovanovicTech I didn't use SonarAnalyzer, just tried Roslynator recently. Comparing to the empty list of project warnings in VS code, I got 1k+ immediatly. Most of them were syntactic and annoying, but some were useful. It suggested to use latest c# features, one of them rewrote my entire function to a small switch expression... another one suggested to use Span for performance.
@Harryizback
@Harryizback Жыл бұрын
Why do you use Visual studio and not Rider IDE?? Why????
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
I can
@tonym5857
@tonym5857 Жыл бұрын
Nice ...
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Thanks
@rusektor
@rusektor Жыл бұрын
00:02 Typo "proEJct" 😐
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Uh oh!
Fix Your Controllers By Refactoring To Minimal APIs
14:56
Milan Jovanović
Рет қаралды 43 М.
8 Tips To Write Clean Code - Refactoring Exercise
16:06
Milan Jovanović
Рет қаралды 36 М.
бабл ти гель для душа // Eva mash
01:00
EVA mash
Рет қаралды 7 МЛН
This dad wins Halloween! 🎃💀
01:00
Justin Flom
Рет қаралды 59 МЛН
Não sabe esconder Comida
00:20
DUDU e CAROL
Рет қаралды 64 МЛН
7 Serilog Best Practices for Better Structured Logging
13:36
Milan Jovanović
Рет қаралды 27 М.
3 .NET "Best Practices" I Changed My Mind About
10:16
Nick Chapsas
Рет қаралды 104 М.
Clean Architecture Project Setup From Scratch With .NET 7
12:02
Milan Jovanović
Рет қаралды 134 М.
This Folder Structure Makes Me 100% More Productive
24:36
Web Dev Simplified
Рет қаралды 77 М.
The Logging Everyone Should Be Using in .NET
15:34
Nick Chapsas
Рет қаралды 79 М.
Extremely FAST Caching Repository With Decorator Pattern in ASP.NET Core
15:21
How to Measure Time Correctly in .NET
9:43
Nick Chapsas
Рет қаралды 41 М.
Adding Filtering, Sorting And Pagination To a REST API | .NET 7
24:02
Milan Jovanović
Рет қаралды 57 М.
This is the Only Right Way to Write React clean-code - SOLID
18:23
You Need to Update Your .NET Solution Files!
6:59
Nick Chapsas
Рет қаралды 77 М.