Yesterday, I released a little tool that creates the ddf and wsp files as part of the vs build process. The downfall was that you still had to manage all those templatefile lines in the manifest file. This morning, I fixed that.
The way the app works now is that it looks for a file in your project called ManifestTemplate.xml. Because there are so many different things you can do in the manifest, I didn't want to take control away from being able to customize the manifest file. Maybe you have multiple assemblies you want to include, or you have resource files. I'm just concerned about the TemplateFiles section right now because it can get pretty overwhelming.
The ManifestTemplate.xml file is essentially exactly like your old manifest.xml, just without the TemplateFiles section. This tool takes ManifestTemplate.xml, and through the same process used to create the ddf file, appends the TemplateFiles section to it with all the needed child TemplateFile nodes, and outputs the manifest.xml file to the root of your project. This way you still have complete control over what's going on in the manifest, but can add and remove files from the template directory all you want.
Here's the build process steps:
1) Dev builds project
2) ManifestTemplate.xml is transformed to manifest.xml with all TemplateFiles included
3) Manifest.xml file created at root of project
4) DDF file created at root of project
5) Assembly is compiled
6) WSP file created in /wsp directory
View Codeplex Site for executable and source code
Check out the post yesterday for installation and configuration instructions
Latest release notes:
- Better error handling than yesterday
- Don't want a file included in the solution, add '.exclude' to the filename
- Files in the root directory of a feature (ie:/Template/FEATURES/featurename) are excluded, as those files should be in Feature.xml's ElementManifests section
- resx files or files included in a directory named Resources are included in the ddf, but not in template files, as those should be in the RootFiles or Resources section
- ListTemplate files for a custom list definition, if included in a directory named ListTemplates, are also not included in the TemplateFiles section of the manifest. These files should be in the list definition's Feature.xml. Any other files in the ListTemplates directory are excluded.
Update(9/23/07): I've created a Visual Studio 2005 project tempate for wsp development. Check it out!
Example ManifestTemplate.xml (same as manifest.xml,but no template files section):
<Solution SolutionId="3ECF115B-B0C1-457e-87DB-D844FB763775" xmlns="http://schemas.microsoft.com/sharepoint/" ResetWebServer="TRUE">
<Assembly DeploymentTarget="GlobalAssemblyCache" Location="assembly.dll">
<SafeControl Safe="True" Assembly="assembly, Version=22.214.171.124, Culture=neutral, PublicKeyToken=[your pkt]" Namespace="assembly" TypeName="*"/>
<SafeControl Safe="True" Assembly="assembly, Version=126.96.36.199, Culture=neutral, PublicKeyToken=[your pkt]" Namespace="assembly.ServerControls" TypeName="*"/>
<Assembly DeploymentTarget="GlobalAssemblyCache" Location="3rdParty.dll">
<SafeControl Safe="True" Assembly="3rdParty, Version=188.8.131.52, Culture=neutral, PublicKeyToken=kjh2kh32kjh21j" Namespace="3rdParty.WebControls" TypeName="*"/>