Working with PowerShell Core on Linux

Here are some useful notes I have been updating whenever I have some new findings.

Installation

First thing first, here is the official documentation on installing pwsh or pwsh-preview on Linux OS.

A known issue

This is a known issue that pwsh will hang after executing any external command if $TERM is screen, i.e. you are running pwsh inside a screen. However, according to the GitHub comment, it seems screen is to blame.

Though this does not limit its usage with other system utilities, I’d like to know if readers like you have some handy solution… Comment below! Continue reading “Working with PowerShell Core on Linux”

If resx localization doesn’t work on your .NET Core application…

Let’s say, you are writing .NET Core application in VS 2017. You have added the following resx resource files to your project

  • Resources.resx (Let’s take it as en)
  • Resources.fr.resx
  • Resources.zh-Hans.resx

However, when running on a French OS, sometimes you may still get English text  for Resource via  GetString.

You might as well try Rebuilding the project.

How to close all the presentations in PowerPoint

Okay, I’ve to say I put it here so that I can simply copy & paste & run it when it’s needed.

Querying Network Status in .NET programming

Work with My namespace

We can use My.Computer.Network.IsAvailable in Visual Basic.NET to determine whether the network is connected. The definition of this property is:

It leads to the approach in C#. Continue reading “Querying Network Status in .NET programming”