This is for all people who know whats VSTO (Visual Studio Tools for office) and have developed apps using it and have not been able to deploy to end user systems. This is the most easy solution I have found to deploy document level solutions i.e. for a single
excel or word file after a long time struggling.

Though there are many ways to deploy VSTO solution for a document level and most handy one i have found so far has been - signing the assembly with a strong name then add entry in the .NET 2.0 security configuration. This is most handy because if you use URL then you cant shift the location of the folder which i needed in my case. Here are the steps.

(NOTE: In the end users computer - You need to install feature .NET forms programmability in Office 2003 by using add/remove features in office 2003 installer and then install VSTOR.exe which can be found in the VSTO CD)
(NOTE: In the developers computer you need the Visual Studio SDK if you need the Microsoft .NET Framework 2.0 Configuration under the admin tools of the control panel)

1) First open your VSTO solution project and open project properties and then go to signing. Then give sign the assembly and key file name choose new. Enter a file name in the dialog box and set password if you need it. then save the project and rebuild it again.
2) Then go to Control Panel>Administrative Tools>Microsoft .NET Framework 2.0 Configuration
3) Then go to Console Root>Microsoft .NET Framework 2.0 Configuration>My Computer>Runtime security policy>Machine>Code Groups>All code>My_Computer_Zone
4) Right click and create new and enter a name click next and then select condition type to Strong Name.
5) Click import below and select the required assembly and check the name and version boxes and give next, provide Fulltrust and then finish.

Now the assembly is ready to run on developers computer anywhere. But you cant follow all the above steps in the endusers computer because you just can't expect every end user to have VS SDK installed. So the Microsoft .NET Framework 2.0 Configuration console doesnt appear.

I had read in many places about caspol.exe tool and tried it but may be i was doing something wrong, and i just couldn't get it working. so the easiest way is this.
In the developers computer open Control Panel>Administrative Tools>Microsoft .NET Framework 2.0 Configuration and thenright click runtime security policy and select create Deployment package, then set the security level to machine and select a place
to save the MSI file and finish it. Now this msi file can be used to automatically follow the steps 2-5 in the endusers computer.

So dont forget to restart the system after running the MSI file in the end users computer. If any doubt, comment and it will reply or mail me........


  1. hi raj how to contact u yar. .
    did u c my blog . .u given comment
    give suggetions

  2. raj . i have given reference in to open indesign but when i run the application its not comming. . how i can open it yar

    and one more u know how edit existing pdf file. . .


Post a Comment

Popular posts from this blog

DoTween - The Big Demo

Download Android SDK standalone for offline installation

Setting up Visual Studio Code for Haxe Development - Hello World on Mac