1
votes

I have developed a sharepoint 2010 visual webpart application with multiple visual webparts using visual studio 2010. I am able to deploy it successfully to Production server using commands given below:

Add-SPSolution c:\sp\MySampleProject.wsp
Install-SPSolution -Identity MySampleProject.wsp -WebApplication https://MYURL -GACDeployment

In my visual webparts, I am referencing some of the sharepoint custom LISTs and doing add/update operations with list items. Now If I deploy the webpart manually using the commands above, I also need to create all of the reference LISTS at production server. For this what I do, i just take list template to production and replicates the list structure to production.

Is there any way, I could create a auto installer(EXE SETUP or MSI) that should be able to create all the lists as well as deploy all of the webparts to production server. I know this can be done, as whenever we purchase some third party webparts from other vendors, they provide us MSI or other executables that we just execute, and it does everything for US. But I am not sure how to do it. What tool they use to develop these kind of installers.

Any HELP or suggestion ? ?

2

2 Answers

3
votes

CodePlex may have the utility you need. Microsoft doesn't provide an out of the box solution that I'm aware of. From the looks of it, this may be what most 3rd party developers use as well http://sharepointinstaller.codeplex.com/

2
votes

Your feature should be creating these dependant lists/list items on activation, then add the web part to the gallery. This is exactly what feature activation is for!

In reality, I would have them as two features (both scoped to the site collection level). One feature creates the lists/list items, and the second deploys the web part. The second would be dependant on the first. The first one could be a "hidden" feature if you wish.

Whether or not you remove those lists on deactivation is up to you. There's good arguments either way.