Skip to content

[QUICK HINT] Visual Studio – find was stopped in progress

Have you ever been using “Find in Files” function in Visual Studio? If not, try it – it can speed up your work, but… not always. Sometimes it can cause harm to you mental health, especially when it doesn’t work as it supposed to.

So let’s say that you know what you want to look for and where you want to look and when you press “Find All” the result is not quite what you expected:

Find all “where are you”, Subfolders, Find Results 1, Entire Solution, “”
Matching lines: 6 Matching files: 2 Total files searched: 1654
Find was stopped in progress.

You can encounter this problem in almost every version of Visual Studio, even the newest Visual Studio 2012 has this “feature”. The solution is so simple and yet so hard to understand, but believe me – it works.


Just press CTRL+Break or CTRL+ScrollLock and the “Find…” function will be as good as new.

And remember that there are two CTRL keys on you keyboard – if the first one doesn’t work try the second one 😉


VS 2010 Extension Manager – Unable to connect to Online Gallery

This is an issue with some proxy server which prevents Visual Studio 2010 from connecting to the Extensions Online Gallery.

The fix is pretty simple. Just go to the “devenv.exe.config” file and add this line:

<servicePointManager expect100Continue="false"/>

The file can be found inside x:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ directory.

Good luck 🙂

[QUICK HINT] Slow VS2010 debugging

Have you ever had a problem with slow Visual Studio 2010 debugging?

And I mean sooooooo slooooooooooooooooooooooooow… that it’s almost impossible to debug your code (every step through code takes couple of seconds at least).

If you haven’t had a chance to see that kind of VS2010 behavior then you must be a lucky man :). For the rest of unhappy ones here’s a hint:

– close your solution
– go to the solution folder, locate file with .SUO extension
– examine the file’s size and if it’s bigger than 400-500 kB then just remove it (or move it somewhere else)
– open the solution, the .SUO file will be recreated and it should be much smaller

I’m not saying that it’s an ultimate solution for VS2010 debugging slowness but it’s worth a try. Good luck 🙂

How am I supposed to install PostgreSQL server on my Windows 7 without a mental breakdown

Yesterday I thought that installing PostgreSQL server on Windows 7 is like taking a candy from a baby, but… now I’m sure that it isn’t. Until today postgresql server installation on windows was a two step process:

1 step -> downloading the installer from

2 step -> running the installer and clicking “next” button a few times

Today it got more complicated. The simple solution mentioned above won’t work on Windows 7 (at least not for me). Everything will look OK until you try to actually START the server.

So if you got an error …

The service name is invalid.
More help is available by typing NET HELPMSG 2185.
The start command returned an error (2)
Press <return> to continue…

… then read on, because you’ll find a solution to your problem. The problem occured in version and I don’t even want to check other versions, so please forgive me.

Let’s look at the whole installation process:

1) The first step (after downloading the installer of course) is quite easy – we need to double-click the exe file… oh my! Here’s the picture:

2)  If everything went right then we get the installer welcome window. Everything looks just the same as in the earlier versions of PostgreSQL.

3) The next steps are quite standard:

– setting a password for “postgres” user (you just know it’s going to be “qwerty” don’t you? ;))

– selecting the port for sql server

– selecting a locale

4) Ok… now we’re ready to click the final “NEXT” button and watch the pretty green progress bar moving (growing?) from left to right. That was just soooooo easy, wasn’t it? Well it should, but not this time… because at the end of the whole installation process a strange looking message box appears before our very eyes. It says something like:

“blah blah blah… Warning… Problem running post-install step. Installation may not complete correctly. The database cluster initialisation failed”.

Here’s the screenshot:

“But it’s only a Warning” – you may think – “who cares about Warnings, we only care about catastrophic errors ;)”. I thought just the same and the installer reassured me that everything else was fine and the installation was a complete success. You’ll find a proof below:

5) Running the server…

I was so happy that the installation is finally over and I can start my PostgreSQL server. I’ve opened the PostgreSQL folder and double-clicked the “Start Server” icon.

After a few hundreds of miliseconds I was kicked in the face with the following error:

“The service name is invalid” didn’t say much, but the second line looked promising “More help is available by typing NET HELPMSG 2185”. So I used the NET HELPMSG command and got an “unbelievably detailed description” of the problem. Just look at this:

So much for the details 🙂

I’ve decided to browse the Windows Services list (Administrative Tools) and I haven’t found anything with the name “postgresql”. It almost looked like the Warning at the end of the installation process was in fact an ERROR! I was completely shocked but I was still able to hold on and think 🙂

Fortunately the PostgreSQL installer creates a log file (install-postgresql.log) in user’s TEMP directory. At the end of that file I’ve found some interesting info:

Unpacking C:\Program Files (x86)\PostgreSQL\8.4\symbols\zic.pdb
[18:20:49] Running the post-installation/upgrade actions:[18:20:49] Delete the temporary scripts directory…
[18:20:49] Write the base directory to the ini file…
[18:20:49] Write the version number to the ini file…Initialising the database cluster (this may take a few minutes)…
Executing cscript //NoLogo “C:\Program Files (x86)\PostgreSQL\8.4/installer/server/initcluster.vbs” “postgres” “postgres” “here is your password if you forget it” “C:\Program Files (x86)\PostgreSQL\8.4” “C:\Program Files (x86)\PostgreSQL\8.4\data” 5432 “English, United States”
Script exit code: 1
Script output:

Ensuring we can write to the data directory (using icacls):
processed file: C:\Program Files (x86)\PostgreSQL\8.4\data
Successfully processed 1 files; Failed processing 0 files

The database cluster will be initialized with locale English, United States.
initdb: could not find suitable text search configuration for locale English, United States
The default text search configuration will be set to “simple”.

fixing permissions on existing directory C:/Program Files (x86)/PostgreSQL/8.4/data … initdb: could not change permissions of directory “C:/Program Files (x86)/PostgreSQL/8.4/data”: Permission denied

Failed to initialise the database cluster with initdb

Script stderr:
Program ended with an error exit code

The installer wasn’t able to change directory permissions despite the fact that UAC has asked if I want to allow the installer to modify my system settings. Am I the only one who thinks that is quite weird? An installer started with administrative rights cannot change a directory permissions? It turns out that Windows 7 is very secure 🙂

As a nice person I decided to help the poor installer in its quest. I opened the PostgreSQL directory “c:\Program Files (x86)\PostgreSQL\8.4\” and manually set the permissions for the “data” subdirectory. If there is no such subdirectory just create it and set the permissions for Users group to “Full control”. After that you need to uninstall PostgreSQL and install it again. There should be no WARNING 😉 this time and the server should work fine.

… more to come…

Hello cruel world!

Welcome to my sweet little blog. This is your first post and it feels great to write it.