none
Problem Deploying COM Components with ClickOnce

    Question

  • I'd like to publish an application developed in Visual Basic.Net 2010 which is dependent on a Com Component using ClickOnce.I've set the Isolated property of the Com object(dll kind of file) to True and the application builds successfully.However,dozens of nasty warnings pop up in Visual Studio Output window at the build saying:

    "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2580,9): warning MSB3179: Problem isolating COM reference 'AXmsCtrl': Registry key 'HKEY_CLASSES_ROOT\CLSID{30f256c0-ee6e-4c57-a475-e3e81236119f}\Implemented Categories{7DD95801-9882-11CF-9FA9-00AA006C42C4}' was not imported".

    Once the application is installed on a target machine on which the Com component isn't registered,It crashes to death.But,If you register the required Com object manually using the Regsvr32 Command,It'll be working like a charm.

    To solve this problem,I've tried to change the target CPU in the Advance Compiler Settings to x86 from AnyCPU but that didn't work.Also,changed the target framework to .Net4 but that did nothing either.

    I've gone my way out searching the web for an answer but all to no avail.I wonder if anyone could give me an insight to get this fixed.I'd appreciate it all in advance.





    • Moved by lucy-liu Wednesday, May 16, 2012 3:08 AM it is a clickonce issue (From:MSBuild)
    • Edited by Meisam Dehghan Wednesday, May 16, 2012 6:49 PM
    Tuesday, May 15, 2012 6:15 PM

Answers

  • Hi everyone,

    As the last resort to solve this problem,I thought of setting the Target CPU explicitly to be x86 in the Advance Compiler Settings in the Compiler tab of Properties window and it DID the charm,even though the same old warnings are there to stay.The Com components my applications are dependent on are now working on the target machines

    Hope this will help others who've gotten in a similar stumbling block.

    Good Lock,


    Tuesday, May 22, 2012 10:05 AM

All replies

  • Hi Meisam,

    This is a ClickOnce issue, I will move it to ClickOnce and Setup & Deployment Projects forum for a better support.

    Thank you for your understanding!


    Lucy Liu [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, May 16, 2012 3:07 AM
  • See if reg-free com will work for you:

    http://msdn.microsoft.com/en-us/library/ms165432(v=vs.90).aspx

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev

    Thursday, May 17, 2012 6:48 AM
    Moderator
  • Hi Robin,Thanks for your answer.

    If you read my thread more carefully,you would see that I'm already using Registration-Free Com technology by setting the Isolated property of the Com object to True but the question is why I'm getting the following warnings at the build and What they mean to say?

    "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2580,9): warning MSB3179: Problem isolating COM reference 'AXmsCtrl': Registry key 'HKEY_CLASSES_ROOT\CLSID{30f256c0-ee6e-4c57-a475-e3e81236119f}\Implemented Categories{7DD95801-9882-11CF-9FA9-00AA006C42C4}' was not imported".

     Regards


    Thursday, May 17, 2012 7:07 AM
  • Hi,
    I'm not an expert in reg-free COM (obviously). Maybe your COM dll can't be used in this way, and it absolutely has to be registered.

    If you have to do that, you can create a custom prerequisite to install it. You have to make a setup & deployment package (or get an installer) and then create the prerequisite package using the Bootstrapper Manifest Generator and put the files in the same folder as the rest of the prerequisites. Then you can select the prerequisite through VS.

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev


    Thursday, May 17, 2012 7:27 AM
    Moderator
  • Hi Meisam,

    The MSDN document said that 

    MSB3179: Problem isolating COM reference '<assembly>': '<error>'

    This is a generic error message indicating a problem with the generation of RegFree COM entries in application manifest (as specified by theIsolatedComReferencestask parameter). The latter part of the error message contains more information about the nature of the problem. A possible cause of this error is that RegFree COM components are not properly registered on the build computer.

    To correct this error

    • Make sure that all COM components are registered on the build computer.

    Does the COM components are properly registered on the build computer?

    Best Regards,


    Bob Wu [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, May 17, 2012 9:04 AM
    Moderator
  • Hi Bob,So nice of you and other fellows at the community who have answered my question.

    How could one tell if a Com components is properly registered on the build computer?

    You see,In order to register the Com object,I used "Regsvr32 C:\AXmsCtrl.dll" command in the Command Prompt Window and I got a message saying: "DllRegisterServer in C:\AXmsCtrl.dll succeeded"

    So,Did I get it right or not?

    Thanks a lot,




    Thursday, May 17, 2012 7:02 PM
  • Did it fix your problem?

    --RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev

    Friday, May 18, 2012 6:23 AM
    Moderator
  • Hi,Robin

    What you suggested sounds like a great idea but the Com object seems to have been registered on my developing machine as I got a message box saying "DllRegisterServer in C:\AXmcCtrl.dll succeeded" when I ran the Regsvr32 command.So,Why shouldn't the reg-free Com technology be working?

    Sincerely Yours,


    Friday, May 18, 2012 10:00 AM
  • Hi everyone,

    As the last resort to solve this problem,I thought of setting the Target CPU explicitly to be x86 in the Advance Compiler Settings in the Compiler tab of Properties window and it DID the charm,even though the same old warnings are there to stay.The Com components my applications are dependent on are now working on the target machines

    Hope this will help others who've gotten in a similar stumbling block.

    Good Lock,


    Tuesday, May 22, 2012 10:05 AM
  • Hi Meisam,

    I'm glad you find a workaround and thank you for share it with us.

    Best Regards,


    Bob Wu [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, May 24, 2012 1:50 AM
    Moderator