
.NET on Linux – bye, Windows 10 - spetz
http://piotrgankiewicz.com/2016/10/17/net-on-linux-bye-windows-10/
======
scandox
The real story here is the forced updates. How do people who are planning
demos and presentations handle this? It's my worst nightmare.

~~~
GrumpyYoungMan
> _The real story here is the forced updates. How do people who are planning
> demos and presentations handle this? It 's my worst nightmare._

Manually run the update check every 2-3 days and run it again two hours before
the presentation. Any updates that come out in that two hour window will allow
you at least one delay.

Come on, folks, this isn't exactly rocket science here. Keep your OS up to
date and, surprisingly enough, you won't have any problems caused by it being
not up to date.

EDIT: May I also remind everyone that your corporate IT security policy almost
certainly requires you to keep the OS on your work PCs up to date?

~~~
roblabla
OS updates (or any update that potentially takes more than 2 minutes)
shouldn't ever be forced. It's just terrible. Sure, there should be some
prominant prompts saying "Plz update me" from time to time (so the average
joe's computer isn't terribly out of date). But don't force me to update in
the middle of prez. Because clearly, I'm best placed to know what's the best
time for my computer to become an expensive paperweight.

~~~
acdha
The problem is that if you don't make them automatic, people won't install
them. Microsoft spent most of the Windows XP era with people being bitten by
problems which had been patched in many cases years before.

The approach they've taken of making things mandatory is clearly not
universally popular but most of the arguments about it tend to ignore the fact
that it was designed to solve a very real problem which affected millions of
people.

~~~
roblabla
And yet macos doesn't have forced updates. They just prompt the user (with a
very in-your-face message) and people DO update.

Same with linux.

Same with android.

Same with IOS.

If you prompt the user to update, they generally will.

~~~
acdha
That's technically true but not true in real life for most people. Yes, you
can ignore the notice for awhile but fairly soon you'll reach the point where
something like iTunes requires a newer release or you need to upgrade
iOS/Android because an app developer made the business decision that using a
new API offers more benefits than supporting legacy devices.

There are two reasons why this works out better. One is that the non-Microsoft
world isn't dominated by enterprise IT departments demanding binary
compatibility with antique code; the second is that those platforms have spent
many years building trust that major upgrades won't prevent you from working.
In the case of Windows, that was complicated by charging for updates and the
broken IT culture which resisted them amplified with the rough Windows Vista
release cycle causing many people to avoid it for a decade.

------
jorgeleo
"Although the application did run correctly, it threw an exception that
gdiplus.dll could not be found. It makes sense, that’s a Windows component so
it’s not available on Linux. But my point here is that although being the .NET
Core application it’d still crash, so imagine what would happen if I’d publish
it to some Linux server – everything would seem to work, but actually it
wouldn’t. Another point for the .NET Core development on the Linux instead of
Windows."

I am baffled... so silent crashes and the illusion of working is a plus...
really?

I hope I am missing something

~~~
Vendan
I think the point is "develop on the platform you are going to use". You'd get
that error when you were developing on linux, so it'd never make it to
production. If you developed on windows, you'd never get the error, cause you
have gdiplus.dll. Still you should be at least testing on something matching
the target platform, but catching this kind of stuff early is a plus!

~~~
NetStrikeForce
Well, I guess he wouldn't have used gdiplus.dll if he was planning to run the
app on Linux, so I'm guessing the conclusions should be:

\- If you're doing multi-platform software, don't use platform specific
libraries.

\- If you're doing multi-platform software, test on all your target OSes.

Use any OS that makes you productive.

~~~
Vendan
Just to clarify, he didn't use gdiplus.dll, he used System.Drawing, which in
turn uses gdiplus.dll.

~~~
NetStrikeForce
You're right, thanks!

------
jdking
Looks like a sensible option for .Net Core development. VSCode and the command
line tooling look to be pretty decent. I would really miss LINQPad though.

~~~
Rudism
The csharp REPL is actually a fairly decent substitute for LinqPad. It can
pull in 3rd party libraries, has autocomplete, and is all around quite nice to
use. You don't get the automatically generated ORM against your database, but
if you mostly use it to test code snippets or as a shell scripting substitute,
you might be surprised by how little you miss it.

When we migrated all of our .NET development to Linux where I work, I thought
I'd have to at least keep a Windows VM around so I could continue using
LinqPad, but the csharp REPL has pretty much sufficed for everything I do on a
regular basis.

------
IshKebab
> Before I did manage to install a fresh system on my laptop I had to disable
> UEFI, create valid partitions with special flags etc. it took me a while to
> figure this out, yet it wasn’t that difficult.

Ha, right here is why "the year of the Linux desktop" will never happen. It's
basically a kit car. Some people may find it "not that difficult" to weld a
chassis together and rebuild an engine, but it's never going to be mainstream.

~~~
creshal
I wonder what he fucked up to make this necessary. Modern Linux distributions
work fine with UEFI and create the necessary EFI System Partition itself.

~~~
laumars
His UEFI might have "secure boot" locked. I've heard that's an issue with some
laptops.

Obligatory Wikipedia reference:
[https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_In...](https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface#Secure_boot_2)

~~~
creshal
All major distributions ship with shim enabled IIRC, so should work with
Secure Boot.

------
cozuya
Here's my anecdata after recently attempting to move permanently from Windows
to Linux Mint:

* No logitech mouse support = severely disabled experience. I can't use any of the extra mouse buttons in the way I want on my Performance MX. And yes I did spend several hours trying to get it to work but it seems that the button mapping works only for keyboard commands and even that I couldn't make work. And never could make the mouse wheel move at what I consider to be fast enough. Very frustrating.

* While it supposedly exists, I could not make f.lux work. This essentially prevents me from using my computer at all at night.

* The ridiculous amount of times I have to type in my password (and use sudo) is really user unfriendly. Yes I'm sure there's way to disable this or even use root but the average non developer user is going to be hugely turned off by this.

* Node is really, really good on Mint. A full stack MERN/gulp application took 10 seconds(!) to yarn. On windows it would take 2-3 minutes. And chrome just seems much faster for dev. While working on a multiplayer game with 5 windows open (MultiLogin) all of which are connected to livereload, it is about twice as fast for reloads vs windows and a bit faster than macos/macbook pro. Gulp itself takes about 20 seconds to start up on windows the first time is instant here.

So in the end there's just no way I'm going to use Mint for every day use i.e.
websurfing and of course gaming. I'll switch to it when I want to do serious
heads-down dev.. maybe. To be honest the fact that its a bit faster for node
probably won't be a good enough incentive to go through the hassle of setting
up a dual boot.

~~~
hnxy
>While it supposedly exists, I could not make f.lux work. This essentially
prevents me from using my computer at all at night.

I'd recommend using redshift instead
([http://jonls.dk/redshift/](http://jonls.dk/redshift/)). It's free software
and does basically the same thing as f.lux.

~~~
mixmastamyk

        sudo apt-get install redshift-gtk

------
kierenj
I've been spending some time putting together a framework for .NET Core
API/platform development. The main problem with it currently is the lack of
compatible libraries - I've had issues with DI containers, cloud provider
libraries, AOP frameworks and more. Not to mention EF Core is still way off in
terms of production viability. ASP.NET Core is very tasty as a plus.. and
there's always Mono to fill the gap in terms of "full framework" missing
functionality.

~~~
taspeotis
I've discovered Autofac has good support for CoreCLR. Plus it's well designed
and powerful.

~~~
alimbada
I can attest to how well designed Autofac is.

I had to decide on which DI framework to use on a small front end WPF
application that I worked on at a job last year (the app had a lot of
singleton classes that were impossible to unit test hence why I needed to
introduce a DI framework). I'd come from a job where larger framework choices
had been made years prior by senior developers and their framework of choice
at the time was Microsoft's Unity so that was what I had worked with for ~5
years. After a week or so of research and deliberation I decided to go with
Autofac and found it to be really easy to set up and use. For me it hit the
sweet spot between built in functionality and performance.

~~~
xorxornop
And I, too! After discovering Autofac, I've not looked back. Before, I'd tried
various DI frameworks, and always left thinking "I totally do not get what why
people like this DI stuff". Then, Autofac. Everything just works. But - it's
also powerful enough that if I need to do something really clever and/or
complex, I can, and it invariably works.

It works just as well in Core. As such, it's usually the first package I
install in a new Core project.

~~~
flukus
I love autofac, I've been using it for a decade, but have you run into any
situations where the DI built into .net core didn't cut it? In my (limited)
uses I haven't found any shortcomings so far.

------
flukus
I still have to wait for sql server to be ported. But my day job as a c# dev
is the only thing keeping me on windows at the moment.

~~~
spetz
Good point, however, you could always try to run the SQL Server remotely or on
VM for the development purposes.

~~~
matthewking
I've considered a Sql Azure instance for this purpose, for a small dev
database its pretty cheap. Not ideal but Sql Server for linux is coming so
might be ok as a stop gap.

------
UK-AL
I tried this for a months, but eventually moved back.

~~~
romanovcode
Was it because .NET was causing problems for you on Linux or because of lack
of Visual Studio?

~~~
UK-AL
Because the vast majority of the ecosystem isn't .net core ready. So you end
quite major libraries not being available.

------
aargh_aargh
Can I have Paint.NET on Linux yet?

~~~
Jdam
This. Paint.NET is what I'm missing on my Mac so much.

~~~
unixhero
Paint.Net is good, indeed.

Let Krita be your new friend. [https://krita.org/en/](https://krita.org/en/)

~~~
creshal
Would be nice if I didn't need the half the KDE desktop for it.

~~~
lmm
What difference does that make? You don't have to run KDE (heck, I use it on
windows). Yes its UI is a separate library from the specific program - any
well-factored program will do the same, whether it exposes the separation or
not.

~~~
creshal
> What difference does that make?

• It's more packages I need to download. Doubly annoying because 95% of the
packages are just "thin wrapper around foo, because we're too hipster to use
libraries directly like _peasants_ ".

• It installs system-wide services I have to disable/mask just so other
programs don't mistakenly use them because they think I run KDE and they have
to integrate into it.

• Oh wait, I can't disable some of these, because Krita itself needs them and
now I need to figure out how to make them play nice with my desktop
aaaaaarggghhhh

~~~
cash3wz
I agree with you for point 2 & 3, I also hated installing KDE apps for this
exact reason.

But I can't agree on the first one.

I have not checked what these exact thin wrappers are, but most of the time
thin wrappers are really useful for testing and switching to another library
without being tangled in the old one.

It pretty much follow the "D" (Dependency inversion principle) in the
S.O.L.I.D. principles: "Depend upon Abstractions. Do not depend upon
concretions.”.

Again, I have not checked the KDE libs you talk about, so I'm assuming this is
what these wrappers are used for.

(Source :
[https://en.wikipedia.org/wiki/Dependency_inversion_principle](https://en.wikipedia.org/wiki/Dependency_inversion_principle)
& [https://en.wikipedia.org/wiki/SOLID_(object-
oriented_design)](https://en.wikipedia.org/wiki/SOLID_\(object-
oriented_design\)) )

~~~
witty_username
I think
[https://en.wikipedia.org/wiki/Phonon_(software)](https://en.wikipedia.org/wiki/Phonon_\(software\))
is one such example.

------
tmzt
So I've spent some time trying to get an existing asp.net 4.5/4.6 application
to work on Windows Containers using docker, running under Linux in a VM. It
turns out that System.Web only works under microsoft/windowsservercore based
container which will only run on a Server Core, Server 2016, or current
Windows 10 Professional.

I'm wondering why a Nano Server plus additional libraries could not host a
complete asp.net 4.6 runtime, possibly leaving out components that need the
GDI.

------
WayneBro
So, instead of taking 30 seconds to disable automatic Windows Updates, this
person decided to have a hissy fit and throw the baby out with the bath water.

The instructions are pretty simple. You have to toggle one setting. Done
-[http://www.tenforums.com/tutorials/8013-windows-update-
autom...](http://www.tenforums.com/tutorials/8013-windows-update-automatic-
updates-enable-disable-windows-10-a.html#option1)

~~~
runjake
This works well for the those rare people with the luxury over control of
those settings in their workplace.

I actually like the Automatic Update feature. I don't need to remember to run
updates myself all the time. That said, I've been bitten by an hour-long
unusable computer scenario and it's been a bummer, to say the least.

~~~
WayneBro
> ...rare people with the luxury over control of those settings in their
> workplace.

Would you kindly provide a citation for that statement?

I've been programming on Windows for twenty years in various corporations -
never had a problem getting Admin rights on my own machine... I'm now a
consultant and I visit many, many, many job sites - and I just don't see it
being a problem.

Furthermore - Linux wouldn't solve the problem for those rare people who can't
control their settings anyway. So, what's your point?

~~~
king_magic
It's a huge problem in more restricted environments - e.g., investment banks.
Admin access can be very hard to come by.

~~~
WayneBro
OK whether it's a problem or not is definitely up for debate.

The bigger point here is that switching to Linux would not help those people
either.

------
rafaelvasco
If it's a pure dev machine than it's already feasible, but not perfect yet. If
it's an all purpose machine , ie. gaming, dev, sound vsts etc. Than no. Mainly
because of the gaming side unfortunately. I hope Vulkan starts to change that.
Btw.: I'm intrigued about the forced updates. Never had them. Computer only
updates when i want. Maybe i changed some config when installing the OS.

------
V-2
Back in the Windows XP days, there was a way of halting forced updates by
killing a certain process. I had it as a simple batch file on my desktop.
Every time it would come up with "your PC gets restarted in 15 minutes", I'd
just double click on it and carry on undisturbed.

~~~
jasonkostempski
Was that really necessary? As far as I remember, XP let you choose to not
install updates automatically.

~~~
V-2
I can't really argue because it was a while ago, but if I recall some of them
were considered critical and you could postpone them time and time again, but
not really disable them

Plus I wasn't really opposed to safety updates as such, and wouldn't want to
take the burden of remembering about them upon myself - it's just the
arrogant, disruptive manner in which they are delivered that never sat well
with me (if with anybody...)

------
draw_down
I'm not a huge fan of Linux as an everyday desktop OS, but god, Windows is so
awful. It's nice to know the .NET ecosystem is so different from what it was
like back when I used to work in C#, and was pretty much forced to use Windows
for that reason.

------
nikon
I'm in a similar boat but using Project Rider on OSX. It generally works
without issue but is far from ready for general use.

How does VSCode deal with things like running unit tests?

~~~
trydis
I'm sure you can create tasks for running commands like:

dotnet test ([https://docs.microsoft.com/en-
us/dotnet/articles/core/tools/...](https://docs.microsoft.com/en-
us/dotnet/articles/core/tools/dotnet-test))

dotnet watch test
([https://github.com/aspnet/DotNetTools/tree/dev/src/Microsoft...](https://github.com/aspnet/DotNetTools/tree/dev/src/Microsoft.DotNet.Watcher.Tools))

------
Koldark
I have never seen this behavior. It gives me the option to reboot on "off
hours"

------
silicon123
if there would be WPF support on linux it sure would be a competitor but if
you are stuck with desktop applications I'm afraid, it's still Win

~~~
philliphaydon
[https://github.com/AvaloniaUI/Avalonia](https://github.com/AvaloniaUI/Avalonia)

Checkout this project for making WPF cross platform.

~~~
zastrowm
To clarify, this is a cross-platform UI library in the style of WPF; it does
not actually make WPF cross-platform.

~~~
philliphaydon
Yes, was typing on my phone so was trying to keep my message short :)

------
tychuz
Well, domain name made me think about this old sketch:
[https://www.youtube.com/watch?v=GlOoSsfU6cM](https://www.youtube.com/watch?v=GlOoSsfU6cM)

------
oogigogigok
only me who find it amusing how windows devs are LOVING bash now, while most
linux/mac devs who cares run zsh, fish or anything better than ... bash!

cant wait to see the next gen of sloppy shell scripts, yay

~~~
ygra
Well, you're free to use zsh, fish, or anything better on WSL as well.

