Andrew Connell [MVP MOSS]
1375 Posts |  39 Articles |  3498 Comments
.NET  |  MCMS  |  SharePoint  |  Office System
[image]
[image]
PDCBling
[image]
[image]

This page serves as the portal for all information related to the SharePoint Project Utility Visual Studio tool window I've created for developers using Visual Studio 2005 / 2008 with DevExpress' DXCore.

Overview

Background

Like many other SharePoint developers I've adopted a similar approach to building SharePoint projects and solution (*.wsp) files. My process is not unlike many others where I mimic the SharePoint "12" folder structure in my Visual Studio projects (only the folders that I'm using). What got really annoying to me was the repetition of adding the same folders whenever I created a new project. I don't like using custom Visual Studio project templates because then anyone using my project will need to have my template installed. This was meaningless work that a machine could do for me.

In addition, when creating Window SharePoint Services (WSS) 3.0 solutions (*.wsp), SharePoint developers are forced to create a *.DDF file and manifest.xml file that makecab.exe and SharePoint will use in the packaging and deployment of the solution files. Some create these manually and others use home grown tools. None of the tools really caught on to me. I hated building these files as they were almost always following the same process. This was more meaningless work that a  machine could do for me.

So I set out work on this project...

Introducing the Visual Studio SharePoint Project Utility Tool Window

Around July/August 2007 I set out to make my development life much easier. I created a Visual Studio tool window that would do some of this work for me. First and foremost, the primary objective was to help in the customization and content creation of structures needed in a Visual Studio project used for SharePoint development. Second, it was to eliminate the chance for typos and trivial errors. Third, to eliminate repetitive tasks and free me up to do the more complex stuff.

Today this tool window does essentially two things:

Allows the developer to pick the folders to add to the project from the SharePoint 12 folder structure Automatically build the *.ddf and manifest.xml files based on the contents of the project

I showed this tool window off in its very early (and very unstable) form at one of my sessions at SharePoint Connections Fall 2007 conference in Las Vegas in November 2007. A much more mature and stable version (but still very beta) was shown again at my sessions at the Office Developer Conference in San Jose (February 2008) and SharePoint Conference in Seattle (March 2008). Now, I've buttoned it up enough to share it with the community.

Requirements

Visual Studio 2005 / 2008 (all versions except the Visual Studio Express Editions) DXCore v3.0.5 (or higher) by DevExpress

This tool window has been tested against the v3.0.5 build of DXCore in Visual Studio 2005 & 2008 as well as with just DXCore installed as well as with CodeRush & Refactor! Pro v3.0.5 installed.

Download

This part of the page will be updated with the latest release of the components. How can you get news on when the latest are available? I'll post to my blog when there's a new update, so you can subscribe there to get updates as well as my other posts.

» Download the latest release - April, 2008 / v0.8.0

Installation

Installation of the tool window is very straightforward. The tool window is 100% contained in a single assembly. This assembly needs to be copied to the DXCore plugins directory. This is usually in the following location:

C:\Program Files\Developer Express Inc\DXCore for Visual Studio .NET\2.0\Bin\Plugins

You can verify where your plugin directory is by opening Visual Studio and selecting the menu DevExpress » About and clicking the Plug-ins button.

DXCore plugins are only loaded when DXCore loads... this only happens when Visual Studio loads. Therefore, once the assembly is copied to the DXCore plugins directory, close all instances of Visual Studio and reopen them to load the tool window.

Usage Instructions & How It Works

General

DevExpress has a free download called the DXCore. The DXCore is a framework that is available royalty-free from DevExpress for download and install. The DXCore sits on top of Visual Studio and provides a robust plugin framework. In fact, the two commercially available Visual Studio productivity add-ins by DevExpress (CodeRush & Refactor! Pro) are essentially plugin suites (with some extra hooks added into DXCore). Not only does the DXCore provide a plugin framework, but it also provides access to a lot of Visual Studio events and addresses some of the challenges with extending Visual Studio.

The assembly containing the SharePoint Project Utility tool window, once copied to the DXCore plugin folder (see the instructions section above), the next time Visual Studio loads the tool window will load as well. Once loaded, the tool window can be opened by selecting the menu DevExpress » Tool Windows » SharePoint Project Utility:

Once loaded, the SharePoint Project Utility tool window can be pinned or resized like any other tool window.

SharePoint /12/ Folder Assistant

*** For this to work, you must have a Visual Studio project loaded ***

The folder assistant is very straightforward. Simply select the folder(s) you want to add to the project by selecting the checkbox next to the folder and add them to the project by clicking the Add Folders To Project button. For example, checking the TEMPLATE\FEATURES\[ProjectName] folder will generate the following in an empty project template:

Notice how if you are creating a Feature folder, it creates a shell of a feature.xml file for you... that's handy! Also notice how folders named [ProjectName] will be replaced with the name of the current project. All the other folders work in a similar way.

SharePoint Packaging (WSS Solution [*.wsp]) Assistant

*** For this to work, you must have a Visual Studio project loaded ***

Now that part that really saves you some time. All the files in a Visual Studio project have a BuildAction property. If you open the Properties window in Visual Studio (press F4 or View » Properties Window) and select a file, you will see it set to None|Compile|Content|Embedded Resource|CodeAnalysisDictionary. In the WSP Packaging section of the SharePoint Project Utility tool window you'll notice two buttons.

Clicking the Create DDF File button will trigger a process to collect an inventory of all files added to your Visual Studio project and record their build actions. All files set with a BuildAction=None will be ignored (such as *.snk key files). If any files are marked with BuildAction=Compile, a DLL will be added to the DDF file. All remaining files with BuildAction=Content will be listed in the DDF file with their respective folders kept intact.

If the DDF file is not present when clicking the button, it will be automatically generated. If it is already present, it will be completely overwritten so be aware of any chances you make because they will be lost when clicking the Create DDF File button.

Next, clicking the Create manifest.xml button will use the same file inventory and BuildAction property to generate the manifest.xml file. The process has some intelligence built in such that it automatically identifies Features and doesn't deploy them using the <TemplateFiles> node but rather with the <FeatureManifests> node. Developers will likely need to go into this file and customize it to deploy assemblies to the GAC as they default to the Web application's \bin and it defaults to no safe controls among other things. However, the SolutionID is ALWAYS preserved.

Like the DDF file, if the manifest.xml file is not present when clicking the button, it will be automatically generated. If it is already present, it will be completely overwritten so be aware any changes you make because they will be lost with clicking the Create manifest.xml button.

Check out the two following images. The one on the left shows the project before clicking the buttons and the one on the right shows the after results:

 

SharePoint Project Utility Tool Window Options

So what if you don't like where I put these files or what I name the DDF file? No worries... just select the menu DevExpres » Options to bring up the DevExpress Options dialog for all the productivity tools and select the SharePoint Project Utility tool window as shown below:

Use the provided textboxes to change the values of the DDF file name and where the deployment files are placed.

Known Issues & Bugs

This tool window is beta... very beta and therefore there are some known issues:

The tool window expects your project structure to exactly match the commonly accepted structure many in the community are using where the relevant folders in the SharePoint "12" folder are duplicated in the Visual Studio project. Instead of using the name "12", the name "RootFiles" is used for forward compatibility. Everything about the tool window is based off this structure. When the *.DDF & manifest.xml files are build, they are looking for this exact path. If you don't use this path, you will not get ideal results. There are no plans for changing this in the future. Generating & regenerating the *.DDF file will always regenerate all the content, so changes will be lost. Generating & regenerating the manifest.xml file will always regenerate all the content (except the solutionID attribute). Certain elements are not generated:
<SafeControls> for assemblies. <CodeAccessSecurity> for custom CAS policy file changes. <SiteDefinitionManifests> for custom site definitions. <WebTempFile> for custom site templates.
Note that the previous point also means if you add customizations to the manifest.xml file for things like custom CAS policy file changes, they will be lost when regenerating the manifest.xml file. Only supports creating a single Feature in the FEATURES subfolder.

FAQ

Why is there a dependency on the DXCore? Couldn’t it have been built as a Visual Studio Tool Window with the Visual Studio Extensibility stuff?
Maybe, but the DXCore provides a lot more stuff such as a code DOM that could be used in the future among other things. I simply elected to build off the DXCore. There are no plans to make this a generic Visual Studio tool window.
I’ve copied the DLL to the correct folder, but I can’t see the SharePoint Project Utility Tool Window?
Have you closed and restarted all instances of Visual Studio? The tool window plugin is loaded when Visual Studio loads.
Are you seriously regenerating the entire manifest.xml file except the solutionID? I spent a ton of time working on my site definition and CAS policy changes.
I know... and so do I. Trust me, I'm working to get that resolved... and it will be.

Bug Submission & Feature Requests

I've created a SharePoint list to submit bugs and Feature Requests. The list is setup to be anonymous so anyone can post stuff to it. Please use this list, and not the comments in this article, to submit bugs and feature requests:
http://andrewconnell.sharepointservers.com/BlogResources/Lists/CR_SharePointTools

Where To Get More Information?

Where can you get additional information? Below you'll find a handful of blog posts and screencasts. I think the screencasts are the best way to demonstrate exactly what these things can do.

Blog Posts

Change Log & Updates

AC's Visual Studio SharePoint Project Utility Window for SharePoint Developers Launched - v0.8

DevExpress' CodeRush & Refactor! Pro

I wrote a post a while back giving my perspective on what these tools were all about. I think it's a pretty good and quick read:

The next best place to go is to check the product pages for these two products on the DevExpress Web site:

DXCore by DevExpress CodeRush by DevExpress Refactor! Pro by DevExpress

I'll admit, it's hard to really get a grasp of these tools by simply reading some pages on a Web site. DevExpress saw this and added a bunch of screencasts to their site. Even after using these products on a daily basis, I pick up stuff every single time I watch these!

posted on Wednesday, April 09, 2008 9:44 PM

Feedback

 re: AC's VS SharePoint Project Utility Tool Window for SharePoint Developers 4/10/2008 10:00 AM Vujica Neskovic
Gravatar Andrew,

Could you tell me how that thingie works, when you type fxml and the xml for the feature.xml gets generated? I typed fxml, but can't get the xml to be generated. Thanks in advance for your response.

Vujica Neskovic

# re: AC's VS SharePoint Project Utility Tool Window for SharePoint Developers 4/10/2008 10:11 AM AC [MVP MOSS]
Gravatar Vujica-
That's something else I built, but it's not free. Well, what I built is free but you have to buy CodeRush & Refactor. Here's more info on that:
http://www.andrewconnell.com/blog/articles/ProductivityToolsForSharePointDevelopers.aspx

# re: AC's VS SharePoint Project Utility Tool Window for SharePoint Developers 4/10/2008 10:34 PM Bil Simser
Gravatar Can I interest you in a CodePlex project for this so it can grow beyond your original version?

# re: AC's VS SharePoint Project Utility Tool Window for SharePoint Developers 4/10/2008 10:43 PM AC [MVP MOSS]
Gravatar Bil-
Oh it will grow beyond where it is today. I don't have a desire to move this to CodePlex. Happy where it is right now.

 re: AC's VS SharePoint Project Utility Tool Window for SharePoint Developers 4/16/2008 6:10 PM Craig
This is great AC! I think it's the perfect "middle-ground" between starting from scratch and the other WSP building tools out there that do a lot, but usually a lot of what I don't want.

Thanks a million!

# re: AC's VS SharePoint Project Utility Tool Window for SharePoint Developers 5/13/2008 4:41 PM The Danish Dynamo
Gravatar I'm trying to get started with this tool - can you show my how you would solve this problem using your utility?

http://msdn.microsoft.com/en-us/library/ms466023.aspx


# re: AC's VS SharePoint Project Utility Tool Window for SharePoint Developers 5/13/2008 9:15 PM AC [MVP MOSS]
Gravatar Danish Dynamo-
This utility does nothing aside from helping you create the folders, manfiest.xml and DDF files needed for packaging.

# re: AC's VS SharePoint Project Utility Tool Window for SharePoint Developers 5/25/2008 12:00 AM Bil Simser
Gravatar The direct download to DXCore is no longer valid as a new version (3.0.8) is the current one. Here's the link:
http://www.devexpress.com/Downloads/NET/IDETools/DXCore/files/DXCore-3.0.8.exe


# re: AC's VS SharePoint Project Utility Tool Window for SharePoint Developers 5/25/2008 9:36 AM AC [MVP MOSS]
Gravatar Thanks Bil!

 re: AC's VS SharePoint Project Utility Tool Window for SharePoint Developers 5/28/2008 6:07 PM Matt
Gravatar Hey Andrew,

I've just started using this time saver to generate Manifest and DDFs - thanks!

Small issue though - I have files within subfolders inside \RootFiles\Template\Features\MyFeatureFolderName\ other than the feature XML files, such as custom master pages to be provisioned when the feature is activated. Your DDF generator puts these in MyFeatureFolderName\<subfoldername> within the CAB, and the Manifest generator doesn't create any TemplateFile entries for these. I would have expected the DDF to place them in FEATURES\MyFeatureFolderName\<subfoldername> , and manifest to contain TemplateFile elements for location=FEATURES\MyFeatureFolderName\<subfoldername>...

Have I missed something? Thanks again for your free stuff!

# re: AC's VS SharePoint Project Utility Tool Window for SharePoint Developers 5/28/2008 11:32 PM AC [MVP MOSS]
Gravatar Matt-
Doesn't sound like you are using the ElementFile node in the Feature definition file to register those files... you should:

http://www.andrewconnell.com/blog/archive/2007/09/27/6120.aspx

If they are in the Feature's folder, they are pieces of the Feature. Thus, they should be treated as such and deployed with the Feature, not loosely using <TemplateFile> nodes in the manifest.

 re: AC's VS SharePoint Project Utility Tool Window for SharePoint Developers 7/25/2008 12:31 PM erugalatha
Gravatar Hi,

Got a bunch of errors after when opening Visual Studio 2005 after installing DXCore - then your plugin does not load because of those errors.


# re: AC's VS SharePoint Project Utility Tool Window for SharePoint Developers 7/25/2008 1:09 PM AC [MVP MOSS]
Gravatar Erugalatha-
Not a whole lot I can do there... you'll need to reach out to DevExpress. What were the errors? Any chance you have the WSPBuilder installed? I've noticed their hooks into VS are problematic as any addin installed after WSPBuilder throws tons of exceptions.

# re: AC's VS SharePoint Project Utility Tool Window for SharePoint Developers 7/26/2008 6:12 PM The SharePoint Guy
Gravatar Mr Connell,

I love your utility - it provides governance and guidance without creating build dependencies. Your tool is better than WSSeVS, WSPBuilder, Solution Generator and the rest of the pack!

Your "discovery logic" is using the .net Resources folder that I use for resx files. Can you provide a configuration option for excluding the Resources folder and other items?

# re: AC's VS SharePoint Project Utility Tool Window for SharePoint Developers 9/17/2008 8:38 AM Michael Gershkovich
Gravatar Andrew,

Thanks for the great topic.
A little question: WSP packages allow to deploy compilled assemblies (DLL) as well, while such assemblies are installed to the GAC on the destination machine. How could I import such DLL deployment in to the topic project.

Thanks in advance,
Michael.


# re: AC's VS SharePoint Project Utility Tool Window for SharePoint Developers 9/17/2008 10:46 AM AC [MVP MOSS]
Gravatar Michael-
I don't understand the question... to include a DLL in a WSP, you simply add it to the DDF file that will include it in the WSP and you add an entry in the manifest.xml file using the <Assembly> element. Note that you don't have to deploy DLL's to the GAC, they can go in a Web app's \bin directory too.

Post Feedback

Title:
Please enter a title
Name:
Please enter your name
Email:
(email will not be displayed)
Url:
Comments: 
Please enter a comment

Please enter the answer to the supplied question.Please add 1 and 8 and type the answer here:    
All Comments Are Filtered & Moderated
Unfortunately comment spammers are just too effecient and are constantly dirtying up blogs with irrelivant and unwanted comments trying to improve their standing on search engines. All comments on this blog are moderated. I do not censor comments, but I don't approve comments with vulger language or those soliciting products. Most of the time comments are approved within a few hours of being submitted with the only exception when I'm traveling.

Why are you asking for my email address?
The only reason I'm asking for your email address, which isn't required to submit a comment, is to provide a gravatar if you've created an account for yourself and associated your email address with a small image. If you have a gravatar created for the email address you submit, it will appear next to your comment. Otherwise nothing will appear.

What is a gravatar?
A gravatar is a "globally recognized avatar." You can get more information about gravatars, as well as create your own for free, at www.gravatar.com. You can also view my gravatar here.


Copyright © 2003 - 2008 Andrew Connell
Creative Commons License  [image]
This work is licensed under a Creative Commons License
Site design by Heather Solomon.
 
 
MOSS WCM Training
Looking for MOSS 2007 WCM developer training? Look no further! I teach my 4-day hands-on and 5-day online WCM classes for developers I offer through the Ted Pattison Group.

Get more information on the WCM courses!
[image]


Upcoming Classes
 Hands-on WCM:
 » Tampa, FL
   Jan 12-15, 2009
 Online WCM:
 » Dec 8-12, 2008

» Register today!

JAX Office Geeks
Jacksonville Office Geeks (JOG)
JOG is a special interest group in Jacksonville, FL dedicated to bringing the local SharePoint commnity together to share tips, tricks, ideas and best practices for developing solutions on the SharePoint platform.

Next meeting details...
When:
Thur. Nov 20th, 2008
  6-8p EDT
Topic:
Creating & Debugging Custom Timer Jobs in WSS

Speaker:
Andrew Connell, MVP MOSS

RSVP Today!

[image]

» Subscribe to the JOG newsletter



You are viewing a mobilized version of this site...
View original page here

Mobilized by Mowser Mowser