Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3692586
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:16:46+00:00 2026-05-19T04:16:46+00:00

I’m attempting to create a CodeActivity object that will register a DLL on a

  • 0

I’m attempting to create a CodeActivity object that will register a DLL on a remote system during a TFS build. I am successfully impersonating my own user account, which has administrator rights to my machine. (I am trying to register the DLLs on my machine for now.) Note that all the attempts have worked if I run the workflow locally, but not from the build server. Also, if I manually run regsvr32, the DLL will register and unregister correctly.

This is the highly stripped-down code I’m using:

Private DllType As Type 'Type of the DLL being registered is handled elsewhere'
Dim Result As Integer
Result = CInt(DllType.InvokeMember("DllUnregisterServer", BindingFlags.InvokeMethod, Nothing, Activator.CreateInstance(DllType), Nothing))

When I run it, I get this message, the most relevant probably being the inner exception, “Unable to find an entry point named ‘DllUnregisterServer’ in DLL ‘RptBarcodeLabel.dll”

Error = Exception has been thrown by the target of an invocation., stack = at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args)
at TfsCopyFile.DllRegServer.InternalRegServer(Boolean fUnreg)
at TfsCopyFile.DllRegServer.UnRegister()
at TfsCopyFile.TfsRegisterDLL.Execute(CodeActivityContext context), inner exception = Unable to find an entry point named ‘DllUnregisterServer’ in DLL ‘RptBarcodeLabel.dll’.

Another method of remotely registering DLLs might work, too – I’m open to suggestions, as long as the process can be fire off during a build from TFS.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T04:16:46+00:00Added an answer on May 19, 2026 at 4:16 am

    This is the approach I have taken for a similar requirement:

    In the TFSBuild.proj, use Exec action to create a .bat file on the fly on the deployment server; the batch file is remotely executed by PsExec. This example creates a batch file to run msiexec, but you can easily change it to register a dll use regsvr32.

    <Exec Condition="'$(DeploymentServer)'!=''" Command='echo @echo off >"\\$(DeploymentServer)\C$\Temp\Install.bat"' ContinueOnError="true" />
    <Exec Condition="'$(DeploymentServer)'!=''" Command='echo start /wait msiexec /uninstall "{98056358-8984-4554-b0c3-9f2af248a029}" /passive /log "C:\Temp\Uninstall.log" >>"\\$(DeploymentServer)\C$\Temp\Install.bat"' ContinueOnError="true" />
    <!-- Kill the psexec service, otherwise it never terminates. -->
    <Exec Condition="'$(DeploymentServer)'!=''" Command='echo taskkill /IM PSEXESVC.EXE >>"\\$(DeploymentServer)\C$\Temp\Install.bat"' ContinueOnError="true" />
    <Exec Condition="'$(DeploymentServer)'!=''" Command='"C:\Program Files\Sysinternals\psexec" -accepteula \\$(DeploymentServer) -u myuser -p mypassword -w "C:\Temp" "C:\Temp\Install.bat"' ContinueOnError="true" />
    

    If you don’t use something like psexec, you can run into problems with permissions etc when trying to execute commands on the remote server.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a French site that I want to parse, but am running into
We're building an app, our first using Rails 3, and we're having to build
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.