Greg M

Thanks in advance for reading this. I'm making progress (I think in this), and have 2 more questions.

Bit of background:

I am building an Excel 2003 appliation level add-in using VSTO SE. Solution references approximately 6 class library projects that are bundled with the add-in project. All projects in solution have signed strong names.

Problem:

Despite successful build and setup on test machine, the custom menu (and functionality) is not turning on when Excel is started.

What I know:

Thanks to the updated deployment article series at (http://msdn2.microsoft.com/en-us/library/bb332051.aspx), I have gotten the deployment package to compile and install on my test machine. It correctly get the prequisites (verified with VSTO client troubleshooter), and I can see via the .NET 2.0 Framework that Full Trust has been granted to the main Application Add-In assembly.

Question 1: If my add-in references 5 other class libraries, do each of them need a custom action to grant full trust to get the add-in to load The deployment article only walked through when one was required, so that's all I did. If I do need to set up one for each class-library dll, can I keep the same CodeSolutionGroup name, and just create actions for each new install step only I ask this because the uninstall and rollback scripts seem to tag for a Code soution group. Or is it the case that if i have 6 dlls (including add-in), I need 6 insert, rollback, and unstall custom actions.

Question 2: If question 1 doesn't do it the only other avenue I can think of right now is step 2 in the deployment troubleshooting article (http://msdn2.microsoft.com/en-us/library/bb510371.aspx) which says to verify the location of all the assemblies. That webcast demonstrated how to track that on a document-level customization. How do I track this for an application level add-in

Again thanks for your continued help.

Greg



Re: Visual Studio Tools for Office Couple more VSTO Apppliation-Level Add-In Deployment Questions

Ji Zhou ¨C MSFT

Hi Greg,

Yes! I think your first question is just your answer! In fact, the article you mentioned also notes that if we have any satellite assembly or other assemblies. All of them should be granted full trust to let the Add In to be loaded. The following is quotation.

ˇ°Finally, you must grant trust to the assemblies for the solution so that the .NET Framework allows them to execute. You must grant the customization assembly FullTrust permissions. In addition, you must trust any referenced or satellite assemblies with the appropriate level of permissions. Evidence for the trust can consist of an assembly's location, a strong name, a certificate, or a combination of these types of evidence.ˇ±

Yes, you need 6 custom actions to grant full trust to each assembly. And you can keep the same solutionCodeGroupName for all assemblies in the same solution, and distinguish them by assemblyCodeGroupName. As to different projects, the solutionCodeGroupName should be unique. Otherwise, when uninstall the program, it may delete the wrong code group.

Thanks

Ji






Re: Visual Studio Tools for Office Couple more VSTO Apppliation-Level Add-In Deployment Questions

Greg M

Ji,

Thanks for the reply, and your efforts in this forum; I really appreciate it.

VSTO is incredibly intuitive to me, but the deployment issues...not so much, and this helps. At some point, I would say if it's possible to have a code sample for Set Security that disaggregated the Code Group trust and Assembly trust it would be helpful.

Right now, to set the 6 things with unaltered code, I have to make 6 code solution groups for each class library dll under the same solution, which seems a bit silly. I've got that part of it working (still have a registry issue as you'll see in another post), but not in a way that I'd consider great coding.

Anyway, thanks again.

Greg





Re: Visual Studio Tools for Office Couple more VSTO Apppliation-Level Add-In Deployment Questions

Cullen Morris

Ji,

I am creating an AddIn for Excel 2007 using VSTO SE. I have attempted to grant full trust to all of my assemblies using custom actions that use the SetSecurity project - I have created four custom actions that all use the primary output of the SetSecurity project. I can make this work by creating a different solutionCodeGroup for each assembly (I've renamed the custom actions to indicate which assembly each handles). However, for some reason only one of these groups is deleted upon uninstall.

Also, I cannot seem to set it up properly to use a single solutionCodeGroup with unique assemblyCodeGroups. For some reason, only one assembly is placed into the solutionCodeGroup on install, with the other assemblies being ignored.

Can you help with these questions Thank you.