SharePoint wsp solution: How to Deploy Globally - sharepoint

I have created a wsp package and add it to
Central Administration > Operations > Solution Management
using the addsolution command of stsadm. When I click on the Deploy Solution menu, it transfers me to deploy to the solution page. In this page, in the "Deploy To?" section, it shows me a dropdown list with entries like 'All Content web Applications'.
I want to deploy my solution globally so that it is applicable to all new web applications created after the deployment. I have seen WSPs for which "Deploy To?" section shows only a message like "This solution deploys globally" and no dropdown list.

"Globally deployed" only applies to WSP files that don't have web controls and web parts in them. These cannot be "Globally deployed", because the web.config of the web application you choose to deploy to is changed, i.e. entries are inserted in order to register your .dll's containing web controls and web parts.

I think you need to install it into the GAC - However here's a more informed answer:
C:>stsadm.exe -o deploysolution -name
MossSolution.wsp -immediate
-allowgacdeployment
this will deploy it globally. i will
check some time later for
allcontenturl. i have couple of batch
files to deploy WSP files at some
customers. i will check them to see
again in which scenario we used
allcontenturl. but my above reply
about not specifying a URL is correct
that in case when WSP contains only
dll for GAC, you should not specify a
URL.
from this thread on the social.msdn.microsoft.com forums

Related

How to Deploy a Custom WebPartPage to a specific target site (Web)

I have created a custom web part, let's call is AppPart, and a custom web part page, let's call it AppPage, in the same solution. I changed the AppPage's Elements.xml so that it automatically contains the AppPart when the Feature is activated. This works excellent for my purposes. My problem is that Visual Studio will only allow me deploy the feature to a Site (site collection) scope and I need to deploy this page to a Web (specific web site) scope. From my understanding, this is possible to do but a configuration change has to be made by hand.
using powershell, specify the web application in the command.
Install-SPSolution -Identity <SolutionName> -WebApplication <URLname>
take a look at this link & do a ctrl+F for "To deploy a solution package to a single Web application by using Windows PowerShell"
http://technet.microsoft.com/en-us/library/cc262995(v=office.14).aspx

How to get .publishsettings for Web Deployable Web Role?

I enabled the Web Deploy feature for my Web Role and deployed it.
But how can I get hold of the .publishsettings file so I can create a Publishing Profile for it?
This 2 year old article states that it should have been created automatically, but I haven't got that in my profile manager.
Any ideas?
If you are using Visual Studio 2012 or greater, the server explorer to the left will have several Azure items.
Specifically the Windows Azure Compute is what we are looking for, right click on that and say 'add deployment environment'. You will then be prompted with a dialog that allows you to sign in and download publish settings file:
You can get publishsettings file from the following link: https://windows.azure.com/download/publishprofile.aspx
Well, the problem was really behind the keyboard.
So the publishing profile is actually provisioned correctly and automatically to the Web project as the documentation states.
The problem and confusion was that I have a secondary web application in my Solution that I also publish to the same Web Role (referenced as an additional Site in the ServiceDefinition.csdef file).
That Web Project does not get the Publishing Profile, and when I try to create a profile manually, it doesn't work since that (secondary) IIs instance is not configured for Web Deployment.
Oh well, back to the tedious Cloud Service deployment it is...

Azure Cloud Services - Publish incremental changes only

I have a C# ASP.Net MVC4 Web Role deployed on Windows Azure Cloud Services using Package and Publish. First time it uploaded entire package and site has been running fine. When I wanted to publish the next set of changes, the Publish option is trying to upload the entire package again.
I have already configured Remote Desktop and Web Deploy and also enabled incremental updates as per guidelines stated in the article Publishing a Cloud Service using the Windows Azure Tools.
But this seems to be not working and Publish is trying to upload entire package again and again. Has anybody faced this issue and come up with any fix?
Nope.
currently there is no out-of-the-box solution to support incremental changes deploy.
When working with Cloud Services I highly suggest that you do not use Web Deploy for anything else than development/testing. The reason is that all changes made via web-deploy and any other non-full-package-upload process will be wiped out as soon as an instance in being recycled/healed.
I've been working on a project to allow rolling out partial changes. Unfortunately it only supports update to the "bin" folder currently. You can take a look at this project here. It is a good starting point at least.
For quick publish incremental changes to development environment (Not recommended for Production), check - Speed Up Azure Deployments with the New Web Deployment Feature.
In VS2013, choose 'Deploy' from the context menu of the Web App project which is referenced by the role (and not the 'Cloud Service' project referencing the role(s) ... doing that will publish the whole service and all of its roles non-incrementally).
There should be a 'publish profile' which refers to the website on the *.cloudapp.net platform. If there is, it was put there by Visual Studio ... probably when you first ticked the 'Enable Web Deploy for all web roles' check-box when first deploying the service.
However, it might not be there, or be wrong. Because, for example, Visual Studio is dumb, and noticing that you had already published the Web App as a 'Web Site' (before you decided to incorporate it as a 'Web Role' in a service), it decided to leave the existing entry for *.azurewebsites.net alone. Or is it because that project was only included in the role as an <VirtualApplication /> element in the service definition's XML, and Visual Studio just neglected to create it?
So you'll have to find some way to force Visual Studio to re-create the right profile for you, or you'll have to manually copy and edit the publishing profile XML files from a known good source (Properties/PublishProfiles directory under the project root), or just guess the settings from absent documentation.
Those settings will be something like:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<MSDeployServiceURL>https://MYAPP.cloudapp.net:8172/MsDeploy.axd</MSDeployServiceURL>
<DeployIisAppPath>INSTANCE</DeployIisAppPath>
<RemoteSitePhysicalPath />
<AllowUntrustedCertificate>True</AllowUntrustedCertificate>
<SkipExtraFilesOnServer>True</SkipExtraFilesOnServer>
<DeployAsIisApp>False</DeployAsIisApp>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<UserName>MYUSER</UserName>
</PropertyGroup>
</Project>
Where:
MYAPP - is the domain name of the deployed Azure service
INSTANCE - is the name of the instance you want to update (get it from Server Explorer ... it's the 'Name' property of the 'Instance' under your service ... or get it from the list of instances comprising your service from the Windows Azure management dashboard).
MYUSER - is the name of the user you set up when publishing initially, for the Remote Desktop Services

Sharepoint 2007 - Custom webpart deployment doesn't work

I have a custom webpart for Sharepoint 2007. I am trying to deploy it to a new Sharepoint web application. I am using WSPBuilder with VS2010 to do the deploy. When I examine the wss\VirtualDirectories\ folder for the web app, the wpcatalog folder does not exist there. When I go to the Web Part Gallery and click "New" button, the web part is no there either. What could be causing this behavior? Are there any other ways to troubleshoot it?
Thanks.
the wpcatalog is actually a document library containing the .webpart definition files. It is stored in the content database, not the file system.
You need to verify the solution is in fact deployed to your web application, and then activate any features if necessary. You can verify the solution deployment under central administration\operations\solution management.

Creating and updating site columns in MOSS publishing site

I have created a feature, a publishing site, in Visual Studio to MOSS - this feature contains a masterpage, some pages, some site columns etc. I have also created a site collection based on my template.
I have several times updated my mastepage and pages with succes. Now I want to update my site columns, adding some columns, but these changes does not appear in my site collection. If I delete my site collection and create a new the new one gets the correct site columns. What am I missing in my update?
I am using WSPBuilder to build and update my feature.
When you deploy your updated package are you deactivating and reactivating the Feature that provisions the site columns? If you don't, the site columns won't show.
There is no way to include this is the wsp, you could however script the deployment of the .wsp and after it has been deployed (i.e. retracted old version, added new version, then deployed to correct web apps) include an
stsadm -o deactivatefeature -url URL -name FEATURENAME
and
stsadm -o activatefeature -url URL -name FEATURENAME
In the deployment script after all the stsadm calls to deploy the solution.

Resources