0

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;
            selectedWebApps.Add(webApps["DEPLOY-27123"]);
            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)
                        {
                            web.Features.Add(featureGuid);
                        }

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

1 Answer 1

0

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/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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