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 …
Category Archives: Software Development
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 …
Continue reading “Save the key file password in Visual Studio”
Last characters of a string in Ruby
To get the last characters of a string in Ruby, use the following instructions. If the string is shorter than the selected number of characters, the entire string is returned. a = ‘12345’ b = a[-3..-1] || a puts b Returns 345
Permission denied message when you try to upload your new repository to GitHub from a Windows computer
If you work on a Windows computer and create a new GitHub repository, you can copy the code from the GitHub page to set the remote address and push the existing code to the GitHub server. You may get the following error message: $ git push -u origin master Permission denied (publickey). fatal: Could not …
Git configuration
If you use 2-factor authentication in GitHub, generate a 40 character Personal Access Token that you can use as a password to access GitHub repositories. Create a Personal Access Token to use it as password in the Git client Log into GitHub and in the pull down at the upper right select Settings, On the left …
Disable database triggers in Microsoft SQL databases
If you need to temporarily disable triggers in Microsoft SQL databases during database maintenance use the following script –Disable triggers on all tables DECLARE @enable BIT = 0; DECLARE @trigger SYSNAME; DECLARE @table SYSNAME; DECLARE @cmd NVARCHAR(MAX); DECLARE trigger_cursor CURSOR FOR SELECT trigger_object.name trigger_name, table_object.name table_name FROM sysobjects trigger_object JOIN sysobjects table_object ON trigger_object.parent_obj = …
Continue reading “Disable database triggers in Microsoft SQL databases”
Disable foreign key constraints in Microsoft SQL databases
Databases do not allow the deletion of rows if those are referenced in other tables with the foreign key constraint. You can turn off the validation of foreign keys in Microsoft SQL databases for the duration of the maintenance with the following script. –Disable foreign keys on all tables DECLARE @table_name SYSNAME; DECLARE @cmd NVARCHAR(MAX); …
Continue reading “Disable foreign key constraints in Microsoft SQL databases”
Display the branch structure and other important events in the Git command line interface
To set up the display of the branch structure, tags and pulls in the command line interface first create the following “alias” git config –global alias.lgb “log –graph –pretty=format:’%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset%n’ –abbrev-commit –date=relative –branches” To display the branch structure, execute the following “alias” git lgb This will execute the above defined “alias” …
Include PBD files in ClickOnce deployment to show the line numbers in the Stack Trace
If there is an error in an application, the line numbers are only included in the Stack Trace when the PBD files are also in the application directory. To include the PBD files in an application that was distributed with ClickOnce deployment you need to: Right click the main project and select Properties On the …