How many times during the development stage did your project file break after merge? Everything looks great until you deploy app on test or production server(sic!). You finish your work, go home and spend nice evening with your girlfriend or friends. But next day, during checking new issues from quality team, you might see something like that:

Powershell_01

Or complaints why everything looks like shit!

What the hell?! That supposed to work perfectly fine! You go to Visual Studio looking for problematic files and baam! Found it!!

Powershell_02

Your view is not added to the project. It is that simple and silly. It can be any file - view, stylesheet, script file and a bunch of others.

So, we need a simple solution to prevent it from happening again.

Problem is trivial and solution is so. All you have to do is check if all files listed in project catalog are included in project configuration file. You can write simple console app to check it and warn you about files you might miss.

But instead, I've prepared a powershell script. This is my first powershell script so any improvements are mostly welcome (please do it directly on gist).

Script is on github so you can download it, fork it just do what you want to with it.

How you can use it with your current projects?

Simple just add script somewhere to your project and I thought using VS package manager console will be most proper way to use it nicely. Just run script directly in PM Console with solution directory as a parameter.

ENJOY!