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=22.214.171.124, 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=126.96.36.199, Culture=neutral, PublicKeyT
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=188.8.131.52, Culture=neutral, Pub
LOG: Appbase = file:///C:/CRM 4.0 Toolkit/Binaries/DbPopulator/
LOG: Initial PrivatePath = NULL
Calling assembly : dbPopulator, Version=184.108.40.206, 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=220.127.116.11, Culture=neu
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>
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.