none
OnStartupComplete is not called after OnConnection RRS feed

  • Question

  • Hi

    I have a visio add-in. It worked fine in .net 3.5. after upgrading to 4.0 in the development environment everything is fine but in the clients computers OnStartupComplete is not called after OnConnection.

    I'm pretty sure that there is no exception in OnConnection.

    The add-in does not go to Inactive state.

    Any Idea?

    Thanks

    Wednesday, December 10, 2014 10:04 PM

Answers

  • I find the problem.

    There was a difference between some types and interfaces so when it wants to load some types that used in OnStartupComplete before starting a first line of OnStartupComplete it gets that the "method does not have an implementation".

    anyway thank you so much Eugene for your helps.

    Thursday, December 11, 2014 4:28 PM

All replies

  • Hi Daneshk,

    Based on the description and the previews thread:
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/e5884acd-219d-4f21-86bb-c3baf24fd53c/assemblies-not-loading-in-office-addin-with-net-4?forum=vsto#e5884acd-219d-4f21-86bb-c3baf24fd53c

    You are upgrading a Com add-in. Is the add-in checked? You can check the status of Com add-ins via Developer tab->Add-ins group->Com add-in.

    Also how did you upgrading the add-in? Could this issue be reproduced on other machine?

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, December 11, 2014 5:32 AM
    Moderator
  • Hello Daneshk,

    Microsoft Office applications can disable add-ins that behave unexpectedly. If an application does not load your add-in, the application might have hard disabled or soft disabled your add-in.

    Hard disabling can occur when an add-in causes the application to close unexpectedly. It might also occur on your development computer if you stop the debugger while the Startup event handler in your add-in is executing.

    Soft disabling can occur when an add-in produces an error that does not cause the application to unexpectedly close. For example, an application might soft disable an add-in if it throws an unhandled exception while the Startup event handler is executing.

    When you re-enable a soft-disabled add-in, the application immediately attempts to load the add-in. If the problem that initially caused the application to soft disable the add-in has not been fixed, the application will soft disable the add-in again.

    You can read more about that in the How to: Re-enable an Add-in That Has Been Disabled article.

    Thursday, December 11, 2014 12:05 PM
  • Hi Fei

    Thank you for your response.

    I have the same issue in all client PCs. It's only work in the development environment.

    I always create a setup for upgrade by wix that I used it for all older versions.

    Yes. It's checked.

    I saw this article: http://stackoverflow.com/questions/8775111/dteevents-onstartupcomplete-event-not-working-for-vspackage-vssdk2010/13644184#13644184

    Maybe I have the same issue. Do you know how can I do that it Visio Add-in?

    Thursday, December 11, 2014 2:08 PM
  • Hi Eugene

    Thank you for your response.

    In hard and soft disabling add-in should go to Inactive or Disable state.

    In my case it's still in Active state.

    Thursday, December 11, 2014 2:10 PM
  • Do you see the add-in listed as active and the OnStartup event handler is not invoked?

    Enable the Show add-in UI errors setting in the Options of the host application. Do you get any UI errors?

    Do you develop a VSTO based add-in? Are you able to reproduce the issue with a newly created add-in?

    Thursday, December 11, 2014 2:21 PM
  • Yes. The add-in is in active state, OnConnection fired,I put a message box in the last line of OnConnection and it runs fine. Event when I close Visio OnBeginShutdown and OnDisconnection fired properly. But I don't know why OnStartupComplete doesn't fired!!

    I can't find "Show add-in UI errors" in my Visio (I just have it in my other office products) but all of the codes are in try catch and should show errors and I checked execution of line by lines by message boxes now :).

    Yes. It's VSTO. I didn't create another VSTO based on .Net 4 on visio to test this issue yet.


    Thursday, December 11, 2014 2:58 PM
  • I find the problem.

    There was a difference between some types and interfaces so when it wants to load some types that used in OnStartupComplete before starting a first line of OnStartupComplete it gets that the "method does not have an implementation".

    anyway thank you so much Eugene for your helps.

    Thursday, December 11, 2014 4:28 PM