I am new to sharepoint. I have a silverlight web part project. When I deployed using visual studio I have the page aspx on which he is web part. I need to deploy this web part on another sharepoint. To do this, I created a Console Application.

var spUrl = "http://ectdaps:27123";
            var wspPath = "eCTDDeploy.wsp";
            var solutionName = "ectddeploy.wsp";
            using (SPSite site = new SPSite(spUrl))
                SPSolution solution = GetSolutionByName(solutionName);
                if (solution == null)
                    Collection<SPWebApplication> selectedWebApps = new Collection<SPWebApplication>();
            SPWebService ws = SPWebService.ContentService;
            var webApps = ws.WebApplications;
            solution = SPFarm.Local.Solutions.Add(wspPath);
            solution.Deploy(DateTime.Now, true, selectedWebApps, true);      

The package is deployed. BUT fetures are not active. I found a way to activate them.

if (web.Features[featureGuid] == null)

BUT aspx page isn’t created and have to do everything manually. Is it possible to deploy it as well as it does vs that would create a aspx page it was on my web part c completely put down the settings? Or the page will create programmatically (I'm not that all operations can be done programmatically). I have not yet tried the software cause stsadm.exe. But the program must be fully work automatically without my participation. P.S. I'm sorry for my very bad English


You need to add a module file to your VS project. The file will contain the reference to the page that needs to be created and will also contain the markup for the webpart that needs to be added to the page. You can refer this link on how to do it: http://amalhashim.wordpress.com/2013/02/14/sharepoint-deploy-webpart-page-using-module/

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.