diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm
index 5e0fda146510f95caf8dade5a67c779d6c48b678..192c22bfcf2593441386ef7619d7f6b807cc48d2 100644
--- a/src/tools/msvc/Solution.pm
+++ b/src/tools/msvc/Solution.pm
@@ -3,7 +3,7 @@ package Solution;
 #
 # Package that encapsulates a Visual C++ solution file generation
 #
-# $PostgreSQL: pgsql/src/tools/msvc/Solution.pm,v 1.42 2008/06/23 17:54:30 tgl Exp $
+# $PostgreSQL: pgsql/src/tools/msvc/Solution.pm,v 1.43 2008/06/24 01:15:36 tgl Exp $
 #
 use Carp;
 use strict;
@@ -204,6 +204,7 @@ s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY
         chdir('src\backend\utils');
         system("perl Gen_fmgrtab.pl ../../../src/include/catalog/pg_proc.h");
         chdir('..\..\..');
+        copyFile('src\backend\utils\fmgroids.h','src\include\utils\fmgroids.h');
     }
 
     if (IsNewer('src\include\utils\probes.h','src\backend\utils\pg_trace.d'))
diff --git a/src/tools/msvc/clean.bat b/src/tools/msvc/clean.bat
index d061f7c57f5dd8c65fac5872aaefd5b612c2fd0c..2eb16630316b93dc346a2d243daf54519e803940 100755
--- a/src/tools/msvc/clean.bat
+++ b/src/tools/msvc/clean.bat
@@ -1,5 +1,5 @@
 @echo off
-REM $PostgreSQL: pgsql/src/tools/msvc/clean.bat,v 1.11 2008/05/30 00:04:32 tgl Exp $
+REM $PostgreSQL: pgsql/src/tools/msvc/clean.bat,v 1.12 2008/06/24 01:15:36 tgl Exp $
 
 set DIST=0
 if "%1"=="dist" set DIST=1
@@ -21,6 +21,7 @@ if exist src\include\pg_config_os.h del /q src\include\pg_config_os.h
 if %DIST%==1 if exist src\backend\parser\parse.h del /q src\backend\parser\parse.h
 if exist src\include\utils\fmgroids.h del /q src\include\utils\fmgroids.h
 
+if exist src\backend\utils\fmgroids.h del /q src\backend\utils\fmgroids.h
 if exist src\backend\utils\fmgrtab.c del /q src\backend\utils\fmgrtab.c
 if exist src\backend\catalog\postgres.bki del /q src\backend\catalog\postgres.bki
 if exist src\backend\catalog\postgres.description del /q src\backend\catalog\postgres.description