ESRIRegAsm.exe sometimes generates empty ecfg files

2039
1
10-07-2010 06:58 AM
JoakimNilsson
New Contributor
ESRIRegAsm.exe sometimes generates empty ecfg files. This happens when we are building one of our VS 2008 solution files on our build computer. It happens on different projects, and it happens on a mix of C++ and C# projects. When running ESRIRegAsm.exe from the command line it works fine on the same dll that failed when building the solution file. Attaching an empty ecfg file.

ESRIRegAsm is called in the Post-Build Event for C++ projects and in Target AfterBuild for C# projects

Post-Build Event:
"%CommonProgramFiles%\ArcGIS\bin\ESRIRegAsm.exe" "$(TargetPath)"  /v:10.0 /p:Desktop /s

AfterBuild Target:
<Target Name="AfterBuild">
    <Exec WorkingDirectory="$(CommonProgramFiles)\ArcGIS\bin" Command="esriRegasm.exe &quot;$(TargetPath)&quot; /v:10.0 /p:Desktop /s" />
</Target>

System information:
ArcGIS Desktop 10.0.2414
Windows Server 2008 R2 Standard
Processor: Intel Xeon, L5430, 2.66GHz, 2 processors (8 cores)
64-bit Operating System
0 Kudos
1 Reply
JonHall
Occasional Contributor II
Joakim-
Yeah, I noticed a garbage ECFG occasionally, but I haven't looked in months.

You don't need to follow ESRI's advice, and build the ECFG every time you run set-up on your build machine.

Unless the GUIDs have changed, just build it once, put a (good) copy of the ECFG in another permanent folder, and add that (to source control and) as a resource to your project.

In your SetUp project, add the CATID folder to the 'File System on Target Machine', and just install the good old copy of ECFG that you saved as a resource, rather than the new ECFG that's created after each build.

Hope that helps.
0 Kudos