Custom Git Status and Git Pull commands to work with all of your repositories

If you work with many Git repositories it is easy to miss a repository when you commit your changes, and very time consuming to pull from all repositories. It is easy to automate both processes. In this example, we will place all files in the ~/Git/devops-scripts folder. If you want to place your files at another …

The .NET MVC model has to have a parameterless constructor

When you create a class to be used as the model in a .NET MVC application, the class has to have a parameterless constructor. It is called during the POST when the user clicks the submit button of the form. If the class does not have a parameterless constructor, we will get the following generic …

Add SSH key to a Jenkins Git step

To access a Git repository Jenkins can use an SSH key. To add the SSH key to the Jenkins server use the following Chef script Store the SSH key in an encrypted data bag called “keys”. { “id”: “ci_private_keys”, “ci_github_key”: “—–BEGIN RSA PRIVATE KEY—–\n…\n—–END RSA PRIVATE KEY—–“, }   Add the following to the Jenkins …

Migrate databases to and from AWS RDS instances

Amazon Web Services do not provide tools to migrate data to, from and between AWS RDS instances. There is a free utility that can do the job. SQL Server Management Studio (SSMS) Install Microsoft SQL Server Management Studio (SSMS), because the utility uses libraries from it. Download the installer for free from https://msdn.microsoft.com/en-us/library/mt238290.aspx SQL Azure Migration …

Failed to open file ‘…’ , error 2 and error 22

How to restore a MySQL database in Windows To restore a MySQL database on a Windows machine: Place the database backup file in the root directory of your C: drive (trust me, this will make your life easier) Open the Command Prompt Start the MySQL command prompt mysql -u root -p This command will prompt you …

How to edit the GitHub README.md file

The GitHub repositories usually contain a README.md file to describe how to use the project. The GitHub web site has a simple editor, but it has a few limitations If you accidentally refresh the page, you lose your changes, The preview pane is wider than the page that will display your file, so the formatting can be …

An error occurred while signing

When you deploy and application in Microsoft Visual Studio with ClickOnce, you need to sign the installer with a key. To sign the project Visual Studio needs to use the signtool. If the ClickOnce feature is not enabled in Visual studio, it displays the following error message: An error occurred while signing: SignTool.exe was not found …

No mapping specified for instances of the EntitySet and AssociationSet in the EntityContainer

When you move your Visual Studio solution to another workstation you may encounter the following error message: System.Data.Entity.Core.MappingException was unhandled by user code HResult=-2146232032 Message=Schema specified is not valid. Errors: : error 2062: No mapping specified for instances of the EntitySet and AssociationSet in the EntityContainer … Source=EntityFramework   In this case it may help if …

Save the key file password in Visual Studio

When you have already set up the project signing of the C# application for ClickOnce deployment, and move the solution to another workstation you may get the following error message when you build the solution: Severity Code Description Project File Line Suppression State Error Cannot import the following key file: …..pfx. The key file may …