locked
Is .NET Native required for C++ UWP programs? RRS feed

  • Question

  • In migrating our Win10 C++ UWP game to the latest VS2015 RC I went through the steps in https://msdn.microsoft.com/en-us/library/mt148501(v=vs.140).aspx

    Part of the steps enable .NET Native in the .vcxproj. i.e. adding the following:

    <EnableDotNetNativeCompatibleProfile>true</EnableDotNetNativeCompatibleProfile>

    <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>

    However, it's not really clear whether .NET Native is required for a native C++ UWP game.  Are these steps optional?  Would there be any benefit or drawback?

    Thanks.


    Friday, June 19, 2015 5:57 PM

Answers

  • For your case, those flags just have the .NET Native compiler act as a passthrough with no significant effect on your app. The reason those are there is to enable C++ apps to consume .NET WinMDs and have those WinMDs get the benefits of .NET Native.
    • Proposed as answer by Morgan Brown [MSFT] Saturday, July 25, 2015 1:53 AM
    • Marked as answer by dswinerd Wednesday, September 2, 2015 4:57 PM
    Saturday, July 25, 2015 1:53 AM

All replies

  • For your case, those flags just have the .NET Native compiler act as a passthrough with no significant effect on your app. The reason those are there is to enable C++ apps to consume .NET WinMDs and have those WinMDs get the benefits of .NET Native.
    • Proposed as answer by Morgan Brown [MSFT] Saturday, July 25, 2015 1:53 AM
    • Marked as answer by dswinerd Wednesday, September 2, 2015 4:57 PM
    Saturday, July 25, 2015 1:53 AM
  • Sorry, just to clarify - Does your response mean that <EnableDotNetNativeCompatibleProfile> and <UseDotNetNativeToolchain> are NOT required for native-only C++ UWP apps?  If we turn those off, will our C++ UWP apps still function correctly?  

    One detail of .NET native toolchain is that it uses its own intermediate directory (ilc) which stores a copy of all files being included in the UWP package.  For native C++ projects which have gigs of assets (e.g. AAA games), if the .NET native steps aren't doing anything useful, then we'd definitely want to disable them.

    Saturday, September 19, 2015 9:00 PM