Geeks With Blogs
Marc Schuricht Killer Cubes

As I mentioned earlier, I am working on a project that involves using MOSS as a development platform or framework to create an entire application instead of just providing a few simple customizations.  This means that may of the items will be deployed as solutions (.wsp) and feature deployments.

There have been many posts on creating solutions and deploying them to MOSS, but many have lacked the level of detail that would help a lot of developers understand and troubleshoot problems with MOSS solution deployments.

For starters, let's look at the different files and configurations:

  1. Manifest.xml
  2. Feature.xml
  3. Elements.xml
  4. <ProjectName>.ddf

Generally speaking, these are the three files needed to define a solution package and a 4th ddf file used to create a wsp (CAB) file that MOSS will use to install.

Let's use a semi-real-world example to get an understanding of what's going on.  Once we have the two classes set up, we can start to define the different solution/feature files.  For the content of what we will deploy, I will use Andrew Connell's TaskLogger Timer Job as a reference.

http://www.andrewconnell.com/blog/articles/CreatingCustomSharePointTimerJobs.aspx

Manifest.xml

This is the primary file which defines the solution package as a whole.  MOSS uses this file to know where to look for various files. 

 <?xml version="1.0" encoding="utf-8" ?>
<Solution xmlns="http://schemas.microsoft.com/sharepoint/"
          SolutionId="A32DFE4D-B965-42af-B862-5897FA297755"
          DeploymentServerType="[ApplicationServer | WebFrontEnd]">
 <FeatureManifests>
  <FeatureManifest Location="TaskLoggerTimerJob\feature.xml" />
 </FeatureManifests>
 <Assemblies>
  <Assembly DeploymentTarget="[WebApplication | GlobalAssemblyCache]" Location="TaskLoggerTimerJob.dll"></Assembly>
 </Assemblies>
</Solution>

The Solution element defines the SolutionId, just a new guid and the deployment server type.  In this case, since we are deploying a time job, we will use the ApplicationServer.  However, a scenario where you might just use WebFrontEnd would be deploying a simple web part.

The FeatureManifests element refers to the feature.xml files collection.  Yes, you can deploy many features with one solution.  Just specify the different Feature folders.  One, caveat, you must define a feature.xml file for each feature.  Meaning you cannot name the feature.xml file as anything other than feature.xml.  Doing so will give the following error upon deployment:

"The feature path <FeatureName>\otherfeat.xml' must be of the form directory\feature.xml". 

The Assemblies element defines which assemblies you are deploying.  For timer jobs, you MUST deploy to the GAC, however, for other items, you can choose WebApplication as the deployment target. If you deploy as a WebApplication, you must add an entry into the web.config located in the root of the virtual directory of the target of the deployment which specifies the file as a "SafeControl" in the SafeControls Element. 

<SafeControl Assembly="Assembly Name, Version, Culture, PublicKeyToken" Namespace="Namespace" TypeName="*" />

 

Posted on Sunday, November 11, 2007 6:08 PM MOSS 2007 Application Development | Back to top


Comments on this post: MOSS Deployment Scenarios 1 of 4 - Manifest.xml

# re: MOSS Deployment Scenarios 1 of 4 - Manifest.xml
Requesting Gravatar...
HI,
Nice Blog. But little more details are appreciated.

Thanks
shwetha
Left by shwetha on Mar 09, 2009 2:25 AM

# re: MOSS Deployment Scenarios 1 of 4 - Manifest.xml
Requesting Gravatar...
hi... Is there a way to move a folder(which contains files and images) using manifest file and ddf? your help would be appreciated
Left by Thilagam on Dec 16, 2009 5:14 PM

Your comment:
 (will show your gravatar)


Copyright © Marc Schuricht | Powered by: GeeksWithBlogs.net