Running DBpopulator.exe seperately

Jul 8, 2010 at 12:05 AM

Hi All,

I was getting errors when trying execute RunPopulation.exe on windows server 2008, with VSTS 2008. Hence to resolve  the issue I have manually done import customization. However when trying to execute DbPopulator.exe command i get errors and cmd application throws errors and exit. Any help regarding this matter is highly appreciated. Thanks in advance.

for reference mentioning the dbppopulator command executed

 C:\CRM 4.0 Toolkit\Binaries\DbPopulator>dbpopulator.exe  NestedSFAEntitiesWithSt

Unhandled Exception: System.BadImageFormatException: Could not load file or asse
mbly 'Microsoft.Crm.SdkProxy, Version=, Culture=neutral, PublicKeyToken=3
1bf3856ad364e35' or one of its dependencies. An attempt was made to load a progr
am with an incorrect format.
File name: 'Microsoft.Crm.SdkProxy, Version=, Culture=neutral, PublicKeyT
   at dbPopulator.DbPopulator.RetrieveOrgNames()
   at dbPopulator.DbPopulator.Initialize()
   at dbPopulator.DbPopulator.Start(String configFile)
   at dbPopulator.DbPopulator.Main(String[] args)

=== Pre-bind state information ===
LOG: User = REDMOND\v-amitga
LOG: DisplayName = Microsoft.Crm.SdkProxy, Version=, Culture=neutral, Pub
LOG: Appbase = file:///C:/CRM 4.0 Toolkit/Binaries/DbPopulator/
LOG: Initial PrivatePath = NULL
Calling assembly : dbPopulator, Version=, Culture=neutral, PublicKeyToken
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\
LOG: Post-policy reference: Microsoft.Crm.SdkProxy, Version=, Culture=neu
tral, PublicKeyToken=31bf3856ad364e35
LOG: Attempting download of new URL file:///C:/CRM 4.0 Toolkit/Binaries/DbPopula
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.


C:\CRM 4.0 Toolkit\Binaries\DbPopulator>






Aug 9, 2010 at 6:05 AM


Are you running DBPopulator from a 64-bit environment? If executed on a 64-bit environment, the DBPopulator wants to load a 64-bit version of Microsoft.crm.SdkProxy.dll, which leads to the BadImageFormatException.

In the "DBPpopulator" project, go into Project properties->Build and set "Platform Target" to "x86", and then it should work.