locked
What is "Enable Tailored Features"?

    Question

  • In a VS solution, I have an DirectX Application project and several C++ StaticLibrary projects.  I had them all compiling and linking, but running the app would quit silently with error code 0xc0000135.  Trying to determine what in the project settings could be causing this, I found that the application project has "Enable Tailored Features" set to "Yes" and the StaticLibrary projects have it set to "No".  Setting this to "Yes" and now StaticLibrary is an invalid configuration type.

    What is "Enable Tailored Features"?

    Monday, November 21, 2011 6:58 AM

All replies

  • What is "Enable Tailored Features"?

    I have a similar problem too.
    Tuesday, November 22, 2011 11:49 AM
  • Deon Brewis documented a list of what that setting (/ZW compiler switch) enables in comparison to the /clr setting. It's the C++/CX extensions.

    http://social.msdn.microsoft.com/Forums/en-US/winappswithnativecode/thread/0aec2f93-de7e-4f2b-8090-17ceb34ed759

     

     


    Wednesday, November 30, 2011 3:01 AM
    Moderator
  • Hi,

    We are still working on the name of the switch. But essentially this switch exists to enable customers to be able to port existing C++ code to make it Metro style compatible. The scenario is that you are creating a new Metro style application but want to leverage an existing C++ component that you have developed in the past. You would set the "Enable Tailored Features" switch to true, and this instead would do a few things for you:

    1. Set the /ZW switch on the compiler.This swithc mainly allows for consumption of winmd files by the compiler. For more details follow the link that David specifies below.

    2. Sets the /winmd switch on the linker. So if you are authoring any winrt components then the linker will generate the respective winmd.

    3. Compiles the code with the /D "WINAPI_FAMILY=2" so if your code is using any API's that are not allowed for metro style applications you will see build failures which you can then fix.

    4. Static libraries in Metro style applications is not supported - /zw and static libs are not compatible, thus you are seeing the error. As a workaround for your problem you should be able to set /D "WINAPI_FAMILY=2" on your static lib projects build and link them in your DirectX app and move forward.

    Thanks,

    Amit

     

    Thursday, December 1, 2011 2:43 AM
  • 4. Static libraries in Metro style applications is not supported - /zw and static libs are not compatible, thus you are seeing the error. As a workaround for your problem you should be able to set /D "WINAPI_FAMILY=2" on your static lib projects build and link them in your DirectX app and move forward.
    This concerns me a lot.  I am porting a large project that uses several static libraries.  Will Store submission fail if we built our project with static libraries (even if we set WINAPI_FAMILY=2)?  What are our options for porting existing codebases that are valid for Store submission?
    Thursday, December 1, 2011 2:02 PM