Share via


Help with building SPUserUtil

I've been getting quite a few emails pretty much asking the same thing on building SPUserUtil, so I thought I would post this entry to help clarify the subject. I'll also ensure the SPUserUtil documentation is updated in the next release to help specifically call this out.

The SPUserUtil documentation (included in the SharePoint Utility Suite...See bottom of post) includes the following information in the section "Building the tools"


You will also need the following two hotfixes, in order to utilize the new MigrateUser APIs

For Windows SharePoint Services only migrations:

https://support.microsoft.com/kb/896349

For SharePoint Portal Server 2003 migrations, you still need the above fix, in conjunction with the following fix:

https://support.microsoft.com/kb/896357

It is not necessary to have these fixes installed on your server unless you are using the –migrate option of the tools, but if you need to compile without the –migrate option, be sure to remove the /define:__MIGRATE_API option from your build.

Assuming you have installed all the above noted service packs and hotfixes on your Windows SharePoint Services or SharePoint Portal Server 2003 system, compilation is simple.


If you don't have those hotfixes installed OR at least SP2 of both Windows SharePoint Services and SharePoint Portal Server, you'll get the following error message if you try to compile without following the bolded statement above.


Microsoft (R) Visual C# .NET Compiler version 7.10.6001.4 for Microsoft (R) .NET Framework version 1.1.4322 Copyright (C) Microsoft Corporation 2001-2002. All rights reserved.

c:\SPUtilSuite\WSS\SPUserUtil\WebUserUtil.cs(1002,6): error CS0117:

'Microsoft.SharePoint.Administration.SPGlobalAdmin' does not contain a definition for 'MigrateUserAccount'


This is because, the default configuration for BuildWSS.CMD and BuildSPS.CMD includes the /define:__MIGRATE_API option which causes that section of code to call that API to be compiled. If you don't have the hotfixes, or SP2, you'll recieve the error message above.

In the updated documentation, I'll change it up a bit to read something like this.

If you do not have these Post SP1 fixes installed OR SP2 on your server it will fail to compile (insert reason here as noted above). If you cannot upgrade your system, or do not need the –migrate option of the tools, you can remove the /define:__MIGRATE_API option from your build script.

Hope this helps!!!

Keith Richie


For more information in regards to the Schema of the Various SharePoint Tables, see te Databases section in the SharePoint Products and Technologies SDK at:
https://msdn.microsoft.com/library/default.asp?url=/library/en-us/spptsdk/html/SPPTWSSDatabases_SV01072208.asp

SPUserUtil is contained in the The SharePoint Utility Suite at:
https://www.microsoft.com/sharepoint/downloads/components/detail.asp?a1=724

For More information on the Windows SharePoint Services MigrateUserAccount() API:
https://msdn.microsoft.com/library/default.asp?url=/library/en-us/spptsdk/html/tsamSPGlobalAdminMigrateUserAccount_SV01234066.asp

For More information on the SharePoint Portal Server MigrateAccount() API:
https://msdn.microsoft.com/library/default.asp?url=/library/en-us/spptsdk/html/mPortalAccountMigManagerMigrateAccount2_SV01187841.asp

For more information on Windows SharePoint Services and SharePoint Portal Server 2003:
https://www.microsoft.com/sharepoint