Modify the message of an unpushed commit with git (and not only the last)

I am still learning my way around git, which I mostly use from within Visual Studio. Today I had to change a commit message because I noticed later that I had mentioned an incorrect ticket number. Fortunately I had not yet pushed the commits to origin.

If you need to change the latest commit’s message, that is easy. Just perform an “amend” to the latest commit. In the Visual Studio Team Explorer pane, go to Sync, lookup the latest Outgoing Commit edit the message and choose “amend” from the options. Or type git commit –amend -m “My new message” on the command line.

BTW You can also add more changes into the latest commit, which comes in handy if you spot a spelling error just after you commit. 😉

Changing any commit other than the last is a bit more difficult. We’ll need the command line here, there’s no interactive Visual Studio guidance available. But I’ll walk you through it. Lees meer over dit bericht

Delphi: this version does not support command-line compiling (yes, it does)

There are a couple of rare cases where I do an automatic build of a Delphi application from a batch file. This uses the dcc32.exe command-line compiler. This worked great on one machine, but today it failed on another machine that had an identical setup. The error message was:

_PasCoreCompile: This version of the product does not support command line compiling.

2016-08-25_15-24-38

Lees meer over dit bericht

A (more) concise way to test a SQL MERGE for differences if there are nulls involved

In SQL, if you need to compare two columns that are both nullable, your compare statements can quickly get out of hand (and a lot less readable along the way). While fixing a bug in my code, I found out about a way to keep the comparison short and readable using the EXCEPT (or INTERSECT) operator. Lees meer over dit bericht

If you publish a WCF service using EF to IIS, do not forget to distribute sqlserver.dll manually

I’ve spent several hours this week debugging a WCF application using Entity Framework, that was published to an IIS server, only to have every call to the service fill with the error message “The type initializer for [My]DbContext has caused an exception”. Of course, on the dev machine everything was working fine. Short answer: as the blog title implies, the application was missing EntityFramework.SqlServer.dll in its bin folder, because Visual Studio failed to recognize the fact it is referenced by the application. Lees meer over dit bericht

Outlook 2016 latest update clears POP mailbox

I’m still investigating, but it appears as if Outlook 2016 is clearing my POP mailboxes, despite the accounts having been set to keep the mail for 14 days. This always worked flawlessly, but this morning (29 feb…) Outlook started deleting all emails after reception, not only those older than 14 days.

Is it a coincidence that today, leap day, I started having this issue? (Update: yes it is. See below for latest information.)

2016-02-29_10-53-21From the mailserver logs, I can confirm from the logs it is the POP3 client (Outlook) that is sending the DELE commands. All my other devices are set to login using IMAP. If I shut down Outlook, mails are not deleted. As soon as I start it up again, deletions start again.

2016-02-29_10-57-59.jpg

Anyone else seeing this?

I am running Outlook 16.0.6568.2025 (updated this morning and now reporting it is “the latest version”).

Update 11:14

I think this must have started after updating the latest version, I am pretty sure it did not happen before the update. I started Outlook around 08:00 this morning and ran the recommended update shortly before the deletions started happening.

Update 11:28

If Josh is right (and he probably is), the fact that it is a leap day today, is a coincidence. That is unfortunate, as that means the trouble will not automatically be over tomorrow. 🙂

Since I am obviously too late to skip the update, I am investigating options to downgrade now.

Update 11:54

I can confirm that Method 2 mentioned in the KB article worked (for me) to downgrade Outlook, and that the downgraded version does not exhibit this behavior.

Will keep an eye on the article to see if it is fixed to re-enable updates.

Note that I’ve now changed the title of this blog entry to blame “latest update” instead of “leap day”.

Update 07-03

The latest version (build 2036) appears to have this issue fixed. I updated this morning and are having no problems since.

2016-03-07_11-34-26

Quickly connect to a VPN on Windows 10 (revisited)

Update (June ’17): it has taken more than 1,5 years since I posted this, but the Windows 10 “Creators Update” finally contains a Connect button right in the Network Connections flyout… 🙂

Earlier I wrote about a trick to make Windows 10 connect to a VPN with a single action (double-click) instead of three or more. I recently found that this trick had a limitation: it only worked because the username and password for my VPN connection were the same as the username and password of the Windows 10 computer I was using (a local account). On another Windows 10 pc that was using a Microsoft account, it failed telling me the username / password was not correct:

Remote Access error 691 – The remote connection was denied because the user name and password combination you provided is not recognized, or the selected authentication protocol is not permitted on the remote access server.

Because it worked on the first pc, I assumed that rasdial used the username/password I stored in the VPN configuration. It looks like it doesn’t, but uses your Windows username/password instead (need to verify this). One could discuss whether that is a bug or a feature, but in the end, the result is that it doesn’t work for me.

So I started looking for alternatives. Other tricks I found involved storing the username/password in the command file, but I did not want to do that. The solution is to not use rasdial, but it’s nephew rasphone.

Change the line

rasdial "My VPN connection name here"

into

rasphone -d "My VPN connection name here"

Mind the -d before the name of the connection.

It shows the familiar connecting dialog, instead of the command line window, and it just works.

You cannot use a null propagating operator in an expression tree lambda

One of the features I like about the new C# 6.0 is the null conditional operator, and I tend to use it everywhere I can (and should). Until yesterday, when at a statement I wasn’t expecting it, the compiler bit me with error CS8072, An expression tree lambda may not contain a null propagating operator. If you think about it, it makes sense, but it is easy to miss. Lees meer over dit bericht