Problem Deplyng Add-In: the managed add-in loader failed to initialize

A

Alex

I have created a Outlook Add-in Office 2007, dev machine is
vista, VS2005, Office 2007, VSTO SE, it works so fine in the dev
machine.

I created the setup and run it in another vista machine,
the Add-In is successfully installed.
I try to Run Outlook, it work ok,

in the Outlook menù bar i select Tools ->Trust Center -> Add-Ins ->
click GO,

When i try to enable my Add-In the follow error message is raised:

load behavior: not loaded. the managed add-in loader failed to
initialize

Any Idea,

Thanks
--Alessio
 
K

Ken Slovak - [MVP - Outlook]

This is the same shared addin as before?

Did you make sure that all requirements and pre-requisites are installed on
the target system?

Did you use a shim?

Did you test the sample addins from the Outlook team to see if they work
when deployed on the target system?

Where did you register your addin, for current user (HKCU) or for all users
(HKLM)? If to HKCU was elevation needed so that it was registered in the
HKCU hive of the admin and not under the current user's hive?




I have created a Outlook Add-in Office 2007, dev machine is
vista, VS2005, Office 2007, VSTO SE, it works so fine in the dev
machine.

I created the setup and run it in another vista machine,
the Add-In is successfully installed.
I try to Run Outlook, it work ok,

in the Outlook menù bar i select Tools ->Trust Center -> Add-Ins ->
click GO,

When i try to enable my Add-In the follow error message is raised:

load behavior: not loaded. the managed add-in loader failed to
initialize

Any Idea,

Thanks
--Alessio
 
A

Alex

This is the same shared addin as before?

Did you make sure that all requirements and pre-requisites are installed on
the target system?

Did you use a shim?

Did you test the sample addins from the Outlook team to see if they work
when deployed on the target system?

Where did you register your addin, for current user (HKCU) or for all users
(HKLM)? If to HKCU was elevation needed so that it was registered in the
HKCU hive of the admin and not under the current user's hive?




I have created a Outlook Add-in Office 2007, dev machine is
vista, VS2005, Office 2007, VSTO SE, it works so fine in the dev
machine.

I created the setup and run it in another vista machine,
the Add-In is successfully installed.
I try to Run Outlook, it work ok,

in the Outlook menù bar i select Tools ->Trust Center -> Add-Ins ->
click GO,

When i try to enable my Add-In the follow error message is raised:

load behavior: not loaded. the managed add-in loader failed to
initialize

Any Idea,

Thanks
--Alessio


I Mr. SLovak.
This is the same shared addin as before?

No it isn't: VS2005 -> New Project -> Visual Basic -> Office -> 2007
Add-Ins -> Outlook Add-In.
VSTO application-level managed add-ins?
The Set-Up Project is included in the Add-In Solution.
Did you use a shim?

http://msdn2.microsoft.com/it-it/library/bb508939.aspx ?
 
A

Alex

I Mr. SLovak.


No it isn't: VS2005 -> New Project -> Visual Basic -> Office -> 2007
Add-Ins -> Outlook Add-In.
VSTO application-level managed add-ins?
The Set-Up Project is included in the Add-In Solution.


http://msdn2.microsoft.com/it-it/library/bb508939.aspx?- Hide quoted text-

- Show quoted text -

Finally, I have found this MSDN article "Deploying Application-Level
Add-ins" http://msdn2.microsoft.com/en-us/library/ms269007(vs.80).aspx,
The point below are extracted from the article:

"The add-in assembly and all referenced assemblies must be granted
full trust in the security policy of each end user. For more
information, see Security Requirements to Run Office Solutions."

The question is:

What can I do to achieve the full trust security policy for all my
assembly?
 
K

Ken Slovak - [MVP - Outlook]

Use a SetSecurity project to set the CAS using custom actions. See
http://msdn2.microsoft.com/en-us/library/bb332051.aspx parts 1 & 2 for a
step by step method of doing that.

However, you indicate that you're not using a VSTO project, that your
project is a shared addin. In that case you do not need to use a SetSecurity
project. I'd suspect something else is wrong.

To check you can use the Framework 2.0 configuration utility and grant full
trust to your assembly and its folder and then see if your addin will load.
If it does then it was a CAS problem, if not you have to continue looking
elsewhere for your problem.




I Mr. SLovak.


No it isn't: VS2005 -> New Project -> Visual Basic -> Office -> 2007
Add-Ins -> Outlook Add-In.
VSTO application-level managed add-ins?
The Set-Up Project is included in the Add-In Solution.


http://msdn2.microsoft.com/it-it/library/bb508939.aspx?- Hide quoted
text -

- Show quoted text -

Finally, I have found this MSDN article "Deploying Application-Level
Add-ins" http://msdn2.microsoft.com/en-us/library/ms269007(vs.80).aspx,
The point below are extracted from the article:

"The add-in assembly and all referenced assemblies must be granted
full trust in the security policy of each end user. For more
information, see Security Requirements to Run Office Solutions."

The question is:

What can I do to achieve the full trust security policy for all my
assembly?
 
A

Alex

Use a SetSecurity project to set the CAS using custom actions. Seehttp://msdn2.microsoft.com/en-us/library/bb332051.aspxparts 1 & 2 for a
step by step method of doing that.

However, you indicate that you're not using a VSTO project, that your
project is a shared addin. In that case you do not need to use a SetSecurity
project. I'd suspect something else is wrong.

To check you can use the Framework 2.0 configuration utility and grant full
trust to your assembly and its folder and then see if your addin will load.
If it does then it was a CAS problem, if not you have to continue looking
elsewhere for your problem.










Finally, I have found this MSDN article "Deploying Application-Level
Add-ins"http://msdn2.microsoft.com/en-us/library/ms269007(vs.80).aspx,
The point below are extracted from the article:

"The add-in assembly and all referenced assemblies must be granted
full trust in the security policy of each end user. For more
information, see Security Requirements to Run Office Solutions."

The question is:

What can I do to achieve the full trust security policy for all my
assembly?- Hide quoted text -

- Show quoted text -

Hi Mr. Slovak,

thanks so much for all, i got solutions (grant full trust to assembly
and its folder ),
to grant full trust i had used a caspol.exe from dos prompt on the
target machine:

%windir%\Microsoft.NET\Framework\v2.0.50727\caspol -u -ag All_Code -
url "<.dll>" FullTrust -n "<name>"

the Add-In work fine in other Vista machine.

clarifications:
-I'm new to Add-In programming and browsing internet i had found this
article: http://msdn2.microsoft.com/it-it/library/bb226712.aspx,
"Customizing the Ribbon in Outlook 2007", downloaded and installed
from the article page this solutions "OutlookRibbonXVB_VSTO" (VSTO SE
Add-In), "OutlookRibbonXVB" (Shared Add-In) and
started to play with both solutions.


--Alessio
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top