locked
VS2008 failed to register COM/Service component after it built. RRS feed

  • Question

  • Fail to register COM component after it is built.

    1. I have a COM component (a project from VS 2005, migrate to VS2008).  - Ran VS2008 with Admin right
    2. The post-build event using REGSVR32 to register the COM component does not work.  I have to remove the event
    3. To register the component, I set the project Link->General - Register Ouput to YES and set the Per-user Redirect option to YES,
    4. after building, VS2008 reported:
        1>Embedding manifest...
        1>Registering output (per-user redirection)...
        1>Project : error PRJ0050: Failed to register output. Please try enabling Per-user Redirection or register the component from a command prompt with elevated permissions.

    5.  The same problem with service post-build registration

    Question: How to make this registration work with VS2008?  BTW, the post-build event mechanism was perfectly fine for years.  Why this function is broken now?

    Thx,


    Coder
    • Edited by codemaniac Friday, November 21, 2008 2:26 AM typo and clarify
    • Moved by liurong luo Friday, November 21, 2008 9:50 AM We are moving this thread from the base "Visual Studio Debugger" forum to this place since the issue here is not related to it. (Moved from Visual Studio Debugger to Where is the Forum For…?)
    Friday, November 21, 2008 2:22 AM

Answers

  •  Hello

    I'm not very clear about your Operating System, but if it happened to be a Windows Vista, that's might be because of the UAC (User Account Control), this access control model did not include any failsafe checks to ensure that users truly wanted to perform a task that required the administrative access token. So, even if you are running as Administrator, you are not really an Administrator.
    and here is a solution:
    Close your Visual Studio IDE and then restart it as an Administrator by right-clicking the Visual Studio icon and selecting Run as Administrator.

    If my solution does not work, please provide us with more information, say, Operating System, things on your component etc.
    And I also noticed that you manually registered it through Command Prompt, are there any errors displayed?

    Thanks in advance!
    Best regards,


    Roahn
    Friday, November 21, 2008 9:46 AM
  • Try here:

    http://social.msdn.microsoft.com/Forums/en-US/category/visualstudio

    Thanks!


    Ed Price (a.k.a User Ed), SQL Server Experience Program Manager (Blog, Twitter, Wiki)

    Saturday, March 31, 2012 4:16 AM

All replies

  •  Hello

    I'm not very clear about your Operating System, but if it happened to be a Windows Vista, that's might be because of the UAC (User Account Control), this access control model did not include any failsafe checks to ensure that users truly wanted to perform a task that required the administrative access token. So, even if you are running as Administrator, you are not really an Administrator.
    and here is a solution:
    Close your Visual Studio IDE and then restart it as an Administrator by right-clicking the Visual Studio icon and selecting Run as Administrator.

    If my solution does not work, please provide us with more information, say, Operating System, things on your component etc.
    And I also noticed that you manually registered it through Command Prompt, are there any errors displayed?

    Thanks in advance!
    Best regards,


    Roahn
    Friday, November 21, 2008 9:46 AM
  • Try here:

    http://social.msdn.microsoft.com/Forums/en-US/category/visualstudio

    Thanks!


    Ed Price (a.k.a User Ed), SQL Server Experience Program Manager (Blog, Twitter, Wiki)

    Saturday, March 31, 2012 4:16 AM