Hacker News new | ask | show | jobs
by avgDev 2463 days ago
I have been developing in .Net MVC 5 and now the last 6 months in .Net Core 2.1. Core is pretty awesome, I would say the learning curve is pretty high, but I'm very satisfied. Previously, I used Java in school. The .Net stack offers a lot of jobs in enterprise companies, if you are someone that dislikes SV mindset.

Also, Visual Studio is an insane IDE. Although, I recently did have some nasty bugs but updates are coming out pretty quickly.

Edit: Microsoft has also added many new videos to help beginners, these cover various topics https://dotnet.microsoft.com/learn/videos.

5 comments

VS is very good but I've been using Rider since the start of this year for most work, I found it to be a very strong competitor.
I've been Rider almost exclusively for about 2 years now, ever since I've been coding Core. VS is fine, but VS w/Resharper is a dog. With Rider, R# is a first class citizen, which makes a huge difference. Not to mention that the vim emulation and other addons are solid due to being shared with the intellij suite of apps.
VS 2019 has been integrating lots of new refactorings that were only on R#. It appears that they are more and more between small releases.

I'm happy to never need to use R# anymore.

Refactorings are but one feature of Resharper. The code hints/suggestions are still far better than vanilla VS, unfortunately (imo).
Rider blows Visual Studio out of the water for anything F# as well. It is really a shame that Microsoft no longer seems to care about it.
I switched to Rider from VS with R# after growing weary of the frequent pauses and the constant whining of my laptop fans.

It took a while to configure the colour scheme to something I was comfortable with, but otherwise the experience has been really positive - I love it!

Same, I’ve been using Rider whenever I can, VS only when I have to. Much better IDE overall.
Visual studio crashes and hangs on me multiple times a day. Rider is just solid.
Visual Studio does this for me a lot as well, especially when projects become larger. The number of times the typeahead caused the app to hang is too numerous to count.

Part of me misses .NET, but I've been mostly working with Golang and Node lately. Visual Studio Code is pretty stellar. Maybe someday VS will catch up to VSC. :)

I also have problems with VS resource usage. It appears to depend on what file type the focussed tab has open. It's still 32-bit, which can't help.

Never had perf issues with VSC, which is surprising considering it's web tech. It's a different class of app to VS but much nicer to use, and of course it's cross platform.

I haven't used VS in about 2 years now, so this experience may be too many versions out of date to be relevant anymore, but for a while I had very similar problems. And then I uninstalled ReSharper, and VS all of a sudden became very snappy.
You can get most of snappiness back even with ReSharper installed. If you dig into the ReSharper option menu, under "Product and feature", and untick everything in the feature section except "Navigation and search", you still get the amazing refactoring and writing-code support but without your computer slows to crawl speed.
I try to avoid anything by Jetbrains, as the process of reporting bugs and trying to get show-stopping bugs fixed has been a nightmare with them. This was during their RC phase of Rider, where I had a number of bugs. They went ahead and shipped it to full release (where it was no longer free of charge) without fixing a single one of the bugs I reported and even followed up on. What is the point of an RC beta test if you are so behind on bug fixes that you're not even able to triage all incoming reports? Seems like it should still be called beta at that point.

To their credit, I've had great experiences with RubyMine, but that was the exception to the rule for my experiences with Jetbrains IDEs.

Edit: Before anyone else downvotes, I'll point out that I realize this is not the experience others have had, but I was not exaggerating these claims.

That’s about the opposite experience that I’ve had, they’ve always been quick to respond and resolve my reported issues, they’ve even created tickets themselves when I’ve reported them over Twitter.
This bug has been open for 3 years (and not touched for 2 years). It's stuff like this you see everywhere: https://youtrack.jetbrains.com/issue/RIDER-3461
Our team uses Rider at work. We love it. The UX blows VS out of the water. Nice and fast too. Unit tests are a first class citizen in Rider too.
It's usually a good idea to wait for the patch release before updating. This applies to most software, including VS, VSC and .NET Core.

Being an early adopter sucks unless you're just testing it out. If it's your job then wait for it to stabilise and for the real-world bug fixes.

The next Long Term Support version of .NET Core will be 3.1. It should be out in November.

.Net 3.0 has gone through about a dozen preview releases and the last 4 have a go-live production license. It's much better tested than the old .NET Framework with its monolithic releases.
I can at least name two bugs. both bugs do not apply to everybody and one is fixable with some additional code. I reported both in preview9, one should be included into 3.0 but was not. the other will be fixed in 3.1:

- https://github.com/aspnet/AspNetCore/issues/13696 - https://github.com/aspnet/AspNetCore/issues/13715

(Edit: corrected first link)

That's very much true for tools like Visual Studio, but not for the runtime itself.
Microsoft have been running things like Bing on it for a while
As a recruiter, I have to say that .Net is still used by startups, especially in Europe and cities like Manhattan with a large European population. I am shamefully plugging the fact that I am recruiting for said roles :-)
Here in NZ its very popular as well.
Re: I would say the learning curve is pretty high

If you had to rank and list the top rough spots in the transition, what would they be? Entity-Framework changes are often cited, but what else is different enough?

Having just come into a .NET shop in the last couple months, having spent much time with Spring / Java the documentation and clarity of what to use is troublesome. I really expected Microsoft to have great documentation, but sadly I’ve not found it great.

So far I’ve done some WCF SOAP work, and an ASP.NET MVC 5 application. Figuring out what the latest frameworks and tools is a bit of legwork. Things aren’t always clear, and not always well integrated.

Figuring out authentication was not clear, whether to use Membership, Identity, where OWIN fit into the picture. If you need custom authentication finding details is hard. Ultimately I figured it out, but it’s clear as mud from a fresh eyes standpoint.

Then setting up DI, which container? Well I had Core DI available, figured that would be a good choice. Except I have to write a good bit of glue code to make it work.

I’m definitely enjoying C# as a language and the standard library. But the ecosystem is a bit clunky.

If you want a more batteries-included less-glue-requiring IoC container, can't recommend Autofac enough. Always up-to-date, responsive developers, thorough documentation. I chose it over ten years ago after reading https://www.manning.com/books/dependency-injection-in-dot-ne...? and have never looked back.
its very simple to get .net core DI working, shouldn't be much code other than registering your types / service.

await new HostBuilder().ConfigureServices((context, services) => { // services.AddTransient.... }).UseConsoleLifetime().Build.RunAsync()

I’m talking DI for ASP.NET MVC 5, non-Core.

That required a custom provider (trivial), and non-obviously a custom ControllerFactory as I picked Core DI instead of a more fully-fledged solution.

Unfortunately there is very little obviousness in documentation and germs often get conflated and confused. Perhaps this is MS trying to get me to take one of their infamous certification courses?

That is because MVC 5 did not support DI out of the box. This has been fixed with Core. It is quite easy now, since I was able to figure it out haha.
It depends where your starting point is. Core bundles a lot of stuff together that was previously separate or just good practice. If you are familiar with MVC / WebAPI / EF / OWIN and already doing DI / Logging etc. then it's not much of a leap.
This is correct. I did not use DI before moving to Core and that was probably the toughest. Once learned, DI is great.

MVC 5 to Core should be a pretty easy transition if you know DI.

I feel "DI" in the context of .NET Core is often the IoC container you feel forced to use. DI is a pattern, but even trying to use the logger extension without the service provider is a pain.
Rough spot for me is the way Startup.cs works. I mean, I'm glad it works at all, but I find the UX a bit nasty compared to how to configure SpringBoot applications.

It just feels very clunky in comparison. I have to remember so many things, which I invariably can't so I have to look them up.

I find EF Core pretty straightforward.

I went from developing front-end only with the MEAN stack, to full-stack with Webforms, to MVC...and I was easily more confused with the transition to MVC than anything else. Even being accustomed to EF now, I still would bet money that I could write data access code twice as quickly with half as many issues. I fail to see what's so much better about working with an object than understanding SQL and your data. Everyone claims MVC is a more natural, transparent web development paradigm, which I sort of agree with, but anyone who hasn't written APIs or worked with EF before will find themselves trading a lot of productivity for it.
It's great to see the enterprise world catching up with the tech world
Wait, wait, Visual Studio has been way ahead since forever
I fail to see what the point of trying to use VS Code for .NET development would be. I suppose if you like tying one hand behind your back and making things more difficult for yourself for some reason. Or maybe you like cobbling together a rickety pile of plugins.

If cost is a concern, there's Rider or even MonoDevelop.

OmniSharp is the official C# plugin and all you need for .NET projects, and it's usually installed by default. VS Code starts faster, runs lighter, and provides 80% of the functionality of VS for most major products, and it's getting better every release. I find it more productive than VS for typical web projects.
For proper .NET projects I've used both VS Code, VS and Rider.

VS Code doesn't come close.

I use VS Code when doing front end stuff with Vue/TypeScript and I love it for that, but .NET Core was painful on VS Code compared to Rider.

Vscode is lightweight, I don't really refactor all that often, and it's code search function is first class (so is it's vim emulation), and it has a terminal.

Since dotnet core includes a CLI executable, I interact with the project through the CLI. I manually edit the config files. I could run the stack from a netbook if I wanted to.

I work mainly in multi-project F# solutions. VS Code Ionide plug-in seems pretty solid for single project F#, but every time I've tried to use it for multi-project I run into some sort of situation that sends me back to Visual Studio.

VS has had it's own F# problems. The latest Preview edition is pretty solid, with one annoying bug. Almost every time I open my big multi-project solution I need to rebuild to get Intellisense to eliminate the red squigglies, and then close VS and re-open. It's a known issue. Hope MS fixes it soon.