未加星标

.NET on Linux bye, Windows 10.

字体大小 | |
[系统(linux) 所属分类 系统(linux) | 发布者 店小二04 | 时间 2016 | 作者 红领巾 ] 0人收藏点击收藏

I’ve eventually decided to start using the *NIX system for the software development.

Being a windows user and the .NET developer for many years now, it might seem like a radical change, but let me tell you this it was a great decision and here is the explanation.

At first a really short introduction it was Friday (14th of October) and I was working on something at the office. Then this Windows popup came out of nowhere saying: “You have 20 minutes left, after that period we will install the updates. And you can do nothing about it.”.

It was maybe 15 minutes later and I could see my laptop shutting down already.

Then 2 or 3 updates were installed which took almost an hour, in the middle of the day (and work). So yeah, screw you Windows 10.


.NET on Linux   bye, Windows 10.

Windows 10 “out of nowhere” update.

However, it wasn’t a decision that I made purely based on emotions. Honestly, if it wasn’t for the latest project for which I needed a device with the touchscreen (Lenovo Yoga 900 user here) I’d probably bought the Macbook instead. I guess that one day Apple will make a Macbook with touchscreen and call it revolutionary, but that’s another story.

I still have Windows 10 (un)fortunately on my PC due do the fact, that I need to migrate 1 or 2 more projects into the .NET Core . However, on my laptop that I use at work I did totally wipe out anything related to the Microsoft system and installed linux Mint .

Why Mint? I don’t know, some people on the internet said that if you’re new into the Linux (I do remember some commands, though, good, old times at the university) you should pick this one instead of Ubuntu (no hard feelings bro), so I did.

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.

The installation part was really quick and within a few minutes, I was already able to login to my brand new OS.


.NET on Linux   bye, Windows 10.

Brand new Linux Mint.

First thing I did was to install the .NET Core framework. It was almost that simple as it’s written on this page. Almost, because there was some missing dependency to some .NET Core preview library that couldn’t be resolved so I had to Google it. Once I had my framework running I was finally able to build and run one of my applications. It “worked”. Again, “worked”, because there was one thing that was causing an issue a reference to the System.Drawing in the project.json .

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.

After installing some tools and services such as Git, MongoDB, Redis, Slack, Skype etc. I had to decide how do I want to write the actual code. I’m a big fan of the Visual Studio Code I’m using this one mostly for the javascript development (and everything not related to the C#), however, I had some doubts about my productivity e.g. without the Resharper .

It turned out that there’s some great extension called OmniSharp (you can also use it with Atom, Brackets, Sublime or even Vim) and it works well with the VS Code. Surely, it’s not a Visual Studio + Resharper, but I can use some most basic as well as important features such as find by file, by method/type, rename, go to definition or display references.

I’ve also tried to use the Project Rider but no luck here. It did load my solution correctly, but there was some internal exception caused by the Resharper built into this IDE and I couldn’t really build my projects (I was able to write the code, but shortcuts didn’t work either).

However, I do believe that once JetBrains fixes most of these bugs it will be the best cross-platform IDE available for the .NET development (can’t wait for it to happen). Last but not least, there’s nothing a simple bash script can not solve in terms of project automation (running, testing and so on).


.NET on Linux   bye, Windows 10.

Visual Studio Code + OmniSharp is the way to go.

And the last part, which is Docker . So, the story is that I was planning to put my hands on Docker for quite some time now. I did play with it a little bit in the past but couldn’t find a real use for my projects. Yet, the things are different now since we’ve started developing some of our application using theMicroservices + CQRS patterns it seems like a good idea to make use of the Docker images and containers.

And that’s another advantage of using the Linux instead of Windows for the software development process. Linux is a natural environment for the Docker if it works on my machine I can be sure that it will work on some remote server.

I was able to run the Docker on my Windows 10, but you need to use the HyperV or VirtualBox and when I did try to run a docker build it would throw an error due to some system variable or $PATH which I’d need to take care of only because I’m running the Docker on Windows.

Oh, and I guess I did forget to mention why I wasn’t able to run my aurelia application on Linux so it was built on Windows and the path endings in aurelia.json file were “\\”. I had to replace them as “/” to make it work on Linux (which of course doesn’t work on Windows).

And well, I’m not even going to mention here how great the *NIX bash is and that setting up the NGINX with SSL certificate, reverse proxy and redirection was so simple.


.NET on Linux   bye, Windows 10.

Running Docker as a natural part of ecosystem.

To sum up I’m not trying to say that Windows is not so good for the software development. For example, the Visual Studio will be probably hard to beat for many years amongst many other great tools. My point is that if you’re not tied up to some specific technology which is not cross platform (which usually means for the Windows users only), you might want to give a try to some other environment. It’s always a good thing to try out something new, hone skills and broaden your horizons.

本文系统(linux)相关术语:linux系统 鸟哥的linux私房菜 linux命令大全 linux操作系统

分页:12
转载请注明
本文标题:.NET on Linux bye, Windows 10.
本站链接:http://www.codesec.net/view/483863.html
分享请点击:


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 系统(linux) | 评论(0) | 阅读(37)