Is there a way to make a console application run using only a single file in .NET Core?

Update 2018: .NET Core 3.0 aims to enable a new scenario: packing the .NET Core runtime and all application dependencies into a single executable. At the moment, there are no fail-safe methods to create a single executable file. Since there are a lot of type-forwarding dll files involved, even ILMerge and similar tools might not … Read more

Click Command Line Interfaces: Make options required if other optional option is unset

This can be done by building a custom class derived from click.Option, and in that class over riding the click.Option.handle_parse_result() method like: Custom Class: import click class NotRequiredIf(click.Option): def __init__(self, *args, **kwargs): self.not_required_if = kwargs.pop(‘not_required_if’) assert self.not_required_if, “‘not_required_if’ parameter required” kwargs[‘help’] = (kwargs.get(‘help’, ”) + ‘ NOTE: This argument is mutually exclusive with %s’ % … Read more

How to get tf.exe (TFS command line client)?

You need to install Team Explorer, it’s best to install the version of Team Explorer that matches the version of TFS you are using e.g. if you’re using TFS 2010 then install Team Explorer 2010. 2012 version http://www.microsoft.com/en-gb/download/details.aspx?id=30656 2013 version http://www.microsoft.com/en-us/download/details.aspx?id=40776 2019 version https://visualstudio.microsoft.com/downloads/#visual-studio-team-explorer-2019 You also might be interested in the TFS power tools. They … Read more

Command prompt won’t change directory to another drive

As @nasreddine answered or you can use /d cd /d d:\Docs\Java For more help on the cd command use: C:\Documents and Settings\kenny>help cd Displays the name of or changes the current directory. CHDIR [/D] [drive:][path] CHDIR [..] CD [/D] [drive:][path] CD [..] .. Specifies that you want to change to the parent directory. Type CD … Read more

How can I beautify JavaScript code using Command Line?

First, pick your favorite Javascript based Pretty Print/Beautifier. I prefer the one at http://jsbeautifier.org/, because it’s what I found first. Downloads its file https://github.com/beautify-web/js-beautify/blob/master/js/lib/beautify.js Second, download and install The Mozilla group’s Java based Javascript engine, Rhino. “Install” is a little bit misleading; Download the zip file, extract everything, place js.jar in your Java classpath (or … Read more

Switch php versions on commandline ubuntu 16.04

Interactive switching mode sudo update-alternatives –config php sudo update-alternatives –config phar sudo update-alternatives –config phar.phar Manual Switching From PHP 5.6 => PHP 7.1 Default PHP 5.6 is set on your system and you need to switch to PHP 7.1. Apache: $ sudo a2dismod php5.6 $ sudo a2enmod php7.1 $ sudo service apache2 restart Command Line: … Read more