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