Sdílet prostřednictvím


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\
pushd %CAPDETECT%
@echo Detecting Capabilities of "$(ProjectDir)$(ConfigurationName)"
CapabilityDetection.exe Rules.xml "$(ProjectDir)Bin\$(ConfigurationName)"
popd

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

Comments

  • Anonymous
    October 31, 2010
    The comment has been removed

  • Anonymous
    October 31, 2010
    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.

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

  • Anonymous
    November 01, 2010
    But, it is a good idea to add this to the build.  Thanks Michael for the build settings.