Registering com during build

Hi all

I'm trying to register a COM dll during the build process, my Regsvr32 is looking ok but it returns an error code of 3.

However when I try and register manually (whilst remotely working on the server) it works absolutely fine.

Any ideas?

Thanks
Kev

[274 byte] By [KevinLawrence] at [2008-2-21]
# 1
Error code 3 indicates that the DLL could not be found - double check your path to make sure you are pointing at the right place.
AaronHallberg at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Build Automation...
# 2

I needed to register a dll before the project was build.

In the project folder I created a new folder 'lib' and copied the dll to the folder

Opened the project file in the XML editor and added a new target block:

<Target Name="BeforeBuild">
<Exec Command="regsvr32 /s &quot;$(ProjectDir)lib\dsofile.dll&quot;"/>
</Target>

Opened the solution and in the solution explorer:

-clicked on the 'Show all files' icon

-right clicked on the lib folder and selected "Include in project" .

-Added an existing item: dsofile.dll and set 'Copy to Output Directory' to 'Copy if newer'

MathijsvanAltvorst at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Build Automation...
# 3

Something to consider is whether the build service account has sufficient permission to register the dll on the system. When you tried it manually were you using the same account as the build service account?

Thanks,
Amit

AmitChattopadhyay at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Build Automation...

Visual Studio Team System

Site Classified