External Tool Makepri Exe From Windows Sdk Not Found

-->

This topic describes the schema of the MakePri.exe XML configuration file; also known as a PRI config file. The MakePri.exe tool has a createconfig command that you can use to create a new, initialized PRI config file.

On the VS2015 installer, check 'Windows and Web Development' = 'Universal Windows App Development Tools' 5. Delete sdk folder to remove previous VS files 6. Unzip sdk again and open solution 7. Right click solution = Retarget solution 8.

This is a known issue with the manifest tool (mt.exe) that ships in Visual Studio 2005 SP1. To remove this warning, developers should update their versions of mt.exe to the version that ships in the Windows SDK. Developers should update the instances of mt.exe that ship in Visual Studio 2005 SP1, found in the following three locations: VCbin. XBF is not a problem i think. But I still can't find similar things for PRI. I find there are some clues in AppxApplicabilityEngine.dll (which have Microsoft::Resources::PriFile type) and makepri.exe (which have PriFileManager & PriFileMerger). But I'm unable to reverse them, and I can't find a way to call them (maybe it's impossible to call. A new Windows SDK will not be issued to accompany this version of Windows because this release doesn’t introduce new APIs. That means there’s no need to modify your project files or target a new version of Windows, and you should continue to use the Windows 10 SDK for Windows 10, version 2004. @MelbourneDeveloper sorry, I don't know which specific team in Windows owns that Windows SDK tool. If you email the address above, the folks on that distribution list can redirect your report. Alternately you can file a bug via the Report a Problem tool, which is integrated with the VS Developer Community Portal; or through Product Support if you have a contract.

Note

MakePri.exe is installed when you check the Windows SDK for UWP Managed Apps option while installing the Windows Software Development Kit. It is installed to the path %WindowsSdkDir%bin<WindowsTargetPlatformVersion>x64makepri.exe (as well as in folders named for the other architectures). For example, C:Program Files (x86)Windows Kits10bin10.0.17713.0x64makepri.exe.

The PRI config file controls what resources are indexed, and how. The configuration XML must conform to the following schema.

  • The default element specifies the context (language, scale, contrast, etc.) that should be used to resolve resources when the runtime context does not match any resource candidates. Because this context is specified at build time and does not change, resources are resolved to this context as qualifiers are created. The matched score is stored at build time. Every qualifier must have some value specified. See ResourceContext for details on how resources are chosen.
  • The index element defines discrete indexing passes that are done over the assets. Each indexing pass determines the format-specific indexers to use, and which resources to index.
  • The qualifiers element sets the initial qualifiers for the first file or folder that other resources inherit. Each qualifier element must have a valid name and value (see Tailor your resources for language, scale, high contrast, and other qualifiers).
  • The root attribute is the path root of the physical file for the index pass. It can be relative or absolute. If relative, it is appended to the project root that you provide in the command line. If absolute, it is directly used as the index pass root. Back or forward slashes are acceptable. Trailing slashes are trimmed. The root of the index pass determines the folder to which all resources are considered relative.
  • The startIndexAt attribute is the initial seed file or folder used in indexing. It is relative to the index pass root. An empty value assumes the index pass root folder.
Makepri

Default PRI config file

MakePri.exe generates this new, initialized PRI config file when the createconfig command is issued.

Packaging element

The packaging element defines PRI split information. The schema for the packaging element is defined for both automatic (support for autoResourcePackage along a specific dimension), and manual configuration.

This example shows how to use autoResourcePackage along a specific dimension.

This example shows how to use manual resourcePackage.

MakePri.exe doesn't explicitly block generation of resource PRI files along any specific dimension. Restrictions along a certain set of dimensions are defined and implemented externally by either MakeAppx.exe or other tools in the pipeline.

MakePri.exe parses the packaging element after all the index nodes to populate all the default qualifiers. MakePri.exe collects parsed info in these data structures.

resources@isDeploymentMergeable attribute

This attribute sets a flag in the PRI file that causes

  • Deployment merge to identify that this PRI file can merge.
  • GetFullyQualifiedReference to return an error in case this flag is set and the resource manager has been initialized with a file.

External Tool Makepri Exe From Windows Sdk Not Found Windows

The default value of this attribute is true. MakePri.exe only sets the flag in PRI if you target Windows 10.

We recommend that you omit isDeploymentMergeable (or set it explicitly to true) for resource pack creation if you target Windows 10.

MakePri.exe adds the value of isDeploymentMergeable to the dump file if makepri dump is run with the /dt detailed option.

resources@majorVersion attribute

The default value for this attribute is 1. If you provide an explicit value, and you also use the deprecated /VersionMajor(vma) command-line option for the MakePri.exe tool, then the value in the config file takes precedence.

Here's an example.

resources@targetOsVersion attribute

Indicates the target operating system version. The table below shows the values that are supported; the default value is 6.3.0.

ValueMeaning
10.0.0Windows 10
6.3.0 (default)Windows 8.1
6.2.1Windows 8

External Tool Makepri Exe From Windows Sdk Not Found Iphone

External Tool Makepri Exe From Windows Sdk Not Found

Here's an example.

Note Windows is backward compatible with respect to PRI files; but not always forward compatible.

MakePri.exe adds the value of targetOsVersion to the dump file if makepri dump is run with the /dt detailed option.

Validation error messages

Here are some example error conditions, and the corresponding error message.

External Tool Makepri Exe From Windows Sdk Not Found Windows 7

External
ConditionSeverityMessage
A targetOsVersion other than one of the supported values is specified.ErrorInvalid Configuration: Invalid targetOsVersion specified.
A targetOsVersion of '6.2.1' is specified and a packaging element is present.ErrorInvalid Configuration: 'Packaging' node is not supported with this targetOsVersion.
More than one mode found in the configuration. For example, Manual and AutoResourcePackage specified.ErrorInvalid Configuration: 'packaging' node cannot have more than one mode of operation.
A default qualifier is listed under resource package.ErrorInvalid Configuration: = is a default qualifier and its candidates cannot be added to a resource package.
AutoResourcePackage qualifier contains multiple qualifiers. For example, language_scale.ErrorInvalid Configuration : AutoResourcePackage with multiple qualifiers is not supported.
ResourcePackage QualifierSet contains multiple qualifiers. For example, language-en-us_scale-100ErrorInvalid Configuration : QualifierSet with multiple qualifiers is not supported.
Duplicate resourcepack name found.ErrorInvalid Configuration : Duplicate resource pack name .
Same qualifier set defined in two resource packages.ErrorInvalid Configuration: Multiple instances of QualifierSet '
No candidates are found for the QualifierSet listed for 'ResourcePackage' node.WarningInvalid Configuration: No candidates found for .
No candidates found for qualifier listed under ‘AutoResourcePackage’ node.WarningInvalid Configuration: No candidates found for qualifier WarningInvalid Configuration: No packaging mode specified.

Related topics

Authors: Louis Bavoil and Iain Cantlay

With all modern graphics APIs (D3D11, D3D12, GL4 and Vulkan), it is possible for an application to query the elapsed GPU time for any given range of render calls by using timestamp queries. Most game engines today are using this mechanism to measure the GPU time spent on a whole frame and per pass. This blog post includes full source code for a simple D3D12 application (SetStablePowerState.exe) that can be run to disable and restore GPU Boost at any time, for all graphics applications running on the system. Disabling GPU Boost helps getting more deterministic GPU times from timestamp queries. And because the clocks are changed at the system level, you can run SetStablePowerState.exe even if your game is using a different graphics API than D3D12. The only requirement is that you use Windows 10 and have the Windows 10 SDK installed.

Motivation

On some occasions, we have found ourselves confused by the fact that the measured GPU time for a given pass we were working on would change over time, even if we did not make any change to that pass. The GPU times would be stable within a run, but would sometimes vary slightly from run to run. Later on, we learned that this can happen as a side effect of the GPU having a variable Core Clock frequency, depending on the current GPU temperature and possibly other factors such as power consumption. This can happen with all GPUs that have variable frequencies, and can happen with all NVIDIA GPUs that include a version of GPU Boost, more specifically all GPUs based on the Kepler, Maxwell and Pascal architectures, and beyond.

SetStablePowerState.exe

All NVIDIA GPUs that have GPU Boost have a well-defined Base Clock frequency associated with them. That is the value of the GPU Core Clock frequency that the GPU should be able to sustain while staying within the reference power usage and temperature targets. For the record, for each GeForce GPU, the Base Clock is specified in the associated Specification page on GeForce.com.

Using D3D12, there is an easy way for an application to request the NVIDIA driver to lock the GPU Core Clock frequency to its Base Clock value: by using the ID3D12Device::SetStablePowerState method. When calling SetStablePowerState(TRUE), a system-wide change of GPU power-management policy happens for the NVIDIA GPU associated with the current D3D12 device, and the current GPU Core Clock gets locked to the reference Base Clock recorded in the VBIOS for that GPU, unless thermal events happen. If the GPU detects that it’s overheating, it will then down-clock itself even if SetStablePowerState(TRUE) was called. But in practice, that should never happen if the GPU is in a properly cooled case and its fan is working properly. The result is that the GPU Core Clock frequency is then stable at Base Clock once any D3D12 application calls SetStablePowerState(TRUE) in the system. In other words, GPU Boost gets disabled. And our driver takes care of restoring the previous GPU power-management state when the locking D3D12 device gets released.

Knowing all that, we have written a simple standalone D3D12 application (SetStablePowerState.exe) that can lock and unlock the current GPU Core Clock frequency for any NVIDIA GPU with GPU Boost. The GPU Core Clock frequency gets instantly locked when launching this app, so it can be launched anytime you want to start/stop profiling GPU times. You can monitor your current GPU Core Clock frequency by using NVAPI (see Appendix) or by using an external GPU monitoring tool such as GPU-Z.

Using this standalone SetStablePowerState.exe application to lock the clocks before/after profiling GPU times makes it useless to ever call ID3D12Device::SetStablePowerState from a game engine directly. We actually recommend to never call this D3D12 method from engine code, especially for applications that have both D3D11 and D3D12 paths, to avoid any confusion when comparing GPU profiling results on D3D12 vs D3D11.

Gotchas

Using SetStablePowerState only modifies the GPU Core Clock frequency but does not modify the GPU Memory Clock frequency. So if an application gets a 1:1 between GPU Core Clock and GPU Memory Clock on a normal run, SetStablePowerState can modify it to up to 0.8 to 1. That’s an issue worth knowing as relative performance limiters will slightly shift. So when GPU Boost is disabled, a pass that is both math-throughput and memory-bandwidth limited may become more math limited; or, conversely, it may become relatively less memory limited.

Finally, for the SetStablePowerState call to succeed, you need to have the Windows 10 SDK installed. With Windows 10 up to Version 1511, that’s all you need. But with more recent versions of Windows 10 (starting from the Anniversary Update), you also need to enable “developer mode” in the OS settings, otherwise the call to SetStablePowerState will cause a D3D12 device removal.

Afterword: Some History and How Our Advice Evolved

If you have been following our DX12 Do's And Don'ts blog, you may have noticed that the advice on SetStablePowerState has changed. That could use some explanation…

In the first wave of DX12 games, we saw a couple of beta pre-releases that always called SetStablePowerState(TRUE) by default. As we discussed above, this API call significantly lowers the Core Clock frequency on NVIDIA GPUs and does not represent the end-user experience accurately. It is therefore quite inappropriate to call it by default in a shipping product, or even a beta.

External Tool Makepri.exe From Windows Sdk Not Found

We have also seen confusion result from the use of SetStablePowerState because it only works when the D3D12 debug layer is present on a system. We have seen multiple cases where development engineers and QA departments get different performance results because SetStablePowerState fails on some systems and the failure was quietly ignored.

External Tool Makepri Exe From Windows Sdk Not Found Windows 10

Hence, our recommendation was to avoid SetStablePowerState or use it very thoughtfully and carefully.

For the Windows 10 Anniversary Update (aka Redstone), Microsoft changed the implementation, “SetStablePowerState now requires developer mode be enabled; otherwise, device removal will now occur.” (http://forums.directxtech.com/index.php?topic=5734.new). So any calls to SetStablePowerState will obviously fail on end-users systems or most QA systems. This is a change for the better and makes much of our previous advice irrelevant.

External Tool Makepri Exe From Windows Sdk Not Found

We are still left with the question of whether or not to test with SetStablePowerState. Do you test with reduced performance and more stable results? Do you test end-user performance and accept some variability? Do you monitor clocks and show a warning when variability exceeds a threshold? To be perfectly honest, we have changed our minds more than once at NVIDIA DevTech. This is for good reasons because there is no one true answer. The answer depends on exactly what you are trying to achieve and what matters most to you. We have done all three. We have largely settled on stabilizing the clocks for our in-depth, precise analyses.

Appendix: SetStablePowerState.cpp

Appendix: Monitoring the GPU Core Clock using NVAPI

If you want to monitor your NVIDIA GPU Core Clock frequency without having to use an external tool, you can use the NvAPI_GPU_GetAllClockFrequencies function from NVAPI like in the example code below. We recommend to not call this function every frame, to avoid the risk of introducing any significant performance hit. Instead, we recommend calling it at the beginning and end of a given time interval (for instance before/after a GPU profiling session, or before/after playing a level), and display a warning if the GPU Core Clock frequency has changed during the considered time interval.