Do-It-Yourself SharePoint Tools – SPFeatureHider

Features are cheap! Features are good for you! Use features whenever you can!

As SharePoint developers, we hear this mantra all the time and of course, we create tons of features. This is a good thing, as it affords you control and functionality isolation.

In USP Journal Issue 8, I teach a method that relies heavy on using features. A lot. I’ve created solutions from this method where one ends up with hundreds of features just for the initial deployment. Most of these features are completely irrelevant for end users and thus should be hidden.

However, manually hiding hundreds of features take time. Well, at least it does to you or me, but a computer could hide them all within seconds, which I why I’ve written a small program to do just that.

If you’ve read my previous posts regarding SharePoint tools, you’ll see that this tool falls nicely into the ‘create a tool when you need it’ philosophy, just like the SPSiteLister tool.

The SPFeatureHider tool is very simple, but saves me a lot of time. Basically, it will iterate thorough a folder structure, find all feature.xml files, set the Hidden attribute to True and save the file.

A caveat is that the formatting of the feature.xml file is set to standard one-line per element format. There’s probably a way to work around this, but I can’t be bothered right now.

The syntax is simple. Just run

c:\>SPFeatureHider.exe [path]

Where [path] is the root folder where you want to hide all features.

Because of this simple syntax, it’s also easy to add this program to your external tools. Follow the instructions in the SPSiteLister article and add Solution Directory as a parameter, as shown below.


The whole solution is available for download here (20 kb RAR) or here (20 Kb zip).


Found this article valuable? Want to show your appreciation? Here are some options:

a) Click on the banners anywhere on the site to visit my blog's sponsors. They are all hand-picked and are selected based on providing great products and services to the SharePoint community.

b) Donate Bitcoins! I love Bitcoins, and you can donate if you'd like by clicking the button below.

c) Spread the word! Below, you should find links to sharing this article on your favorite social media sites. I'm an attention junkie, so sharing is caring in my book!

Pin It

Published by

Bjørn Furuknap

I previously did SharePoint. These days, I try new things to see where I can find the passion. If you have great ideas, cool projects, or is in general an awesome person, get in touch and we might find out together.

Leave a Reply

Your email address will not be published.