ShAssocCheck 0.3.0

dotnet add package ShAssocCheck --version 0.3.0
NuGet\Install-Package ShAssocCheck -Version 0.3.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ShAssocCheck" Version="0.3.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ShAssocCheck --version 0.3.0
#r "nuget: ShAssocCheck, 0.3.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ShAssocCheck as a Cake Addin
#addin nuget:?package=ShAssocCheck&version=0.3.0

// Install ShAssocCheck as a Cake Tool
#tool nuget:?package=ShAssocCheck&version=0.3.0

Git for Windows and MSYS2 are capable of providing nearly seamless Bash/CoreUtils integration on Windows. This package verifies that integration is present, and reports developer-friendly diagnostic messages in cases where integration is missing or not behaving as-expected. It will also detect and automatically repair a known issue in Git for Windows integration. If you would like your Visual Studio projects to be robust against developers encountering mysterious build failures due to pipe redirection failures or missing .sh file associations, then add this NuGet dependency.

Keep in mind that this NuGet package normally doesn't do anything, except verify that .sh scripts are in fact working. If you have a controlled development environment where you can ensure everyone has Bash/CoreUtils properly installed, then there's really no need to use the ShAssocCheck NuGet Package.

Changes since 0.2.0

  • Fixed a packaging error that caused file to report as missing even when it wasn't

Usage tip

If you have a solution with many projects then it is a good idea to attach ShAssocCheck NuGet package to a special startup project in your solution that runs before anything else. Often times solutions will have such a project for the purpose of collecting git repository version information and this NuGet package is best added as a dependency there. If the solution doesn't have such a project, then probably it probably should have one.


Why use Bash / CoreUtils ?

In simple terms, CoreUtils and Bash provide a robust CLI toolset that accelerate software development.

  • well-documented POSIX-compliant system
  • compatible with Linux and Mac
    • eliminates need to have .sh for one platform and .cmd or .ps1 for another
    • Consistent newline behavior
  • robust long path name support
    • Path names up to 32,700 characters always work as expected
    • (both cmd and PowerShell are still limited to 260 chars)

How it Works

The script tests for operational .sh file associations by running a short .sh script and getting the result via pipe redirection. If it works, then the script does nothing else. If that check fails, the script proceeds to check sh_auto_file and see if it matches git-bash.exe. If so, it applies the Git for Windows association patch fix via a NSIS installer. The installer is used because it provides the Admin Elevated Rights profile required to modify file types and associations, and will be invoked only once after any Git for Windows install/update (due to GitWin overwritting our association with it's broken one).

Known Problems

Support for stand-alone MSYS2 is currently less than ideal. It's strongly recommended to use Git for Windows as it integrates far better with Windows shell and Explorer out-of-the-box.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.3.0 1,086 2/10/2018
0.2.0 838 2/8/2018

Initial package release.