Adding Windows Phone Capability Detection to your Build Process

There is a new Capability Detection tool in the Windows Phone Developer Tools October update that you can run to determine the capabilities of a DLL or Xap files.  Here is a post build step that I added to a WP7 project to list the capabilities that are explicitly needed for an application:

set CAPDETECT=%ProgramFiles(x86)%\Microsoft SDKs\Windows Phone\v7.0\Tools\CapDetect\
@echo Detecting Capabilities of "$(ProjectDir)$(ConfigurationName)"
CapabilityDetection.exe Rules.xml "$(ProjectDir)Bin\$(ConfigurationName)"

If you don’t accurately list your application capabilities in your application manifest, your application will get rejected when submitted.

Comments (4)

  1. PHenry says:

    Is this application installed with the latest Oct release?  I read in your links and it looks like it is, but I don't see it on my box.  I've confirmed in control panel, I indeed do have the Oct 22 release, what could be the reason I don't see this?

  2. Rene Schulte says:

    My experience showed that you don't have to add any capability before submission. The WMAppManifest will be generated automatically and the right caps will be added (using the CapDetect tool).

    But, you have to add them to use some features when you develop your application. Otherwise an exception will be raised or the functionality just doesn't work.

  3. Captain Smudge says:

    Yes, we had the same experience Rene.  I accidentally left a capability in that wasn't needed.  They removed it during ingestion.

  4. Captain Smudge says:

    But, it is a good idea to add this to the build.  Thanks Michael for the build settings.

Skip to main content