Hacker News new | ask | show | jobs
by kuschku 3106 days ago
C# is significantly missing tooling. The tooling on Windows is okayish, but that's about it.

You have no cross-platform build and dependency management tool that runs on .NET Core (Using MSBuild and NuGet together requires Mono or the full .NET Framework), and there's only an early version of JetBrains' Rider IDE for non-Windows platforms, there's basically no working integration with any CI or CD system, and the library ecosystem is basically not existing, compared to the open source Java world.

1 comments

This is just incorrect, and getting more incorrect every day. Rider is RTM, and works beautifully, particularly with .Net Core. It's trivial to setup CI/CD with Jenkins, or TeamCity, or VSTS.

What library support is missing on .Net vs the JVM? In my experience everything that's really useful has .Net ports.

It is trivial?

Then please help me — I'm trying to use C# more again — what I should use for dependency management, builds, and artifacts deployment (basically, an equivalent to gradle) on .NET Core. I'm seeing Cake, aka C# Make, but the C# subreddit told me that's useless and I should just use MSBuild. But that doesn't get me my dependencies at all, and doesn't run on .NET Core. I could write a bash script to invoke nuget and the C# compiler but that would be ridiculous.

For libraries, from http2 to time + date libraries, C# is lacking, in tmy last project I ended up straight up translating the parts of JSR-310 I needed.

I'm looking for a 1:1 replacement for JVM languages here, especially regarding tooling. Rider has proven much less mature than IDEA for now.

Trying to directly translate a Java-style workflow to .Net is probably going to be tough sledding; it's just not how things are done. You can do it, but you'll fight everything more than being on the happy path. The dotnet CLI tooling is relatively slick, from what I've seen.
What would the C# tooling workflow then look like? I haven't found anything that's reasonably easy to use with just .NET Core.
What were you using Gradle to do that you want a c# replacement for?
Basically everything. In my web projects, gradle runs css and js minification and compilation, and in game projects, it runs the asset preprocessing.

The build-time code is handled with gradle’s buildSrc folder.

I also obviously use Annotation Preprocessors to pre-generate code for my Java projects, and additional build tools to further minify and optimize the output (e.g., for Android, I also run redex over it).

Basically, gradle for me handles the entire build – fetching dependencies, building native libraries, running code generators, building Java code, binding them together, processing assets, compressing the result, and optimizing it all – and deploying the results.

In nice, and modular steps.

"dotnet publish" should have you covered for restoring from nuget, compiling and producing a deployable package. Is there something it's missing for your use case?

Noda Time might have what you need in a datetime library.

> "dotnet publish" should have you covered for restoring from nuget, compiling and producing a deployable package. Is there something it's missing for your use case?

Thanks a lot – this is the first time someone actually provided a useful solution, this might actually work well enough for simple projects.

> Noda Time

Also thank you a lot, that actually is significantly better than Joda Time in the Java world, and as result, actually useful (in fact, it feels like a 1:1 clone of JSR-310, at least from what I've seen in their API docs)

This is actually very helpful, thank you :)