{"record":{"id":"74048b9770ed6bfd","repo":"stride3d/stride","slug":"no-pix-installation-found","errorCode":null,"errorMessage":"No PIX installation found.","messagePattern":"No PIX installation found\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"sources/engine/Stride.Graphics/Direct3D12/WinPixNative.cs","lineNumber":106,"sourceCode":"                throw new DirectoryNotFoundException($\"Microsoft PIX not found under \\\"{programFilesPath}\\\".\");\n\n            string newestVersionFound = null;\n\n            // Enumerate all subdirectories, looking for the one with the highest version number\n            foreach (var dir in Directory.EnumerateDirectories(pixInstallationPath))\n            {\n                var dirName = Path.GetFileName(dir);\n                if (string.IsNullOrEmpty(dirName))\n                    continue;\n\n                if (newestVersionFound is null || string.CompareOrdinal(newestVersionFound, dirName) < 0)\n                {\n                    newestVersionFound = dirName;\n                }\n            }\n\n            if (string.IsNullOrEmpty(newestVersionFound))\n                throw new InvalidOperationException(\"No PIX installation found.\");\n\n            // Return full path to WinPixGpuCapturer.dll\n            string dllPath = Path.Combine(pixInstallationPath, newestVersionFound, CapturerDllName);\n            return dllPath;\n        }\n    }\n\n\n    /// <summary>\n    ///   Ends the current PIX event on the specified Direct3D 12 Command List.\n    /// </summary>\n    /// <param name=\"commandList\">\n    ///   The Direct3D 12 Command List on which to end the PIX event. Must not be <see langword=\"null\"/>.\n    /// </param>\n    [MethodImpl(MethodImplOptions.AggressiveInlining)]\n    internal static unsafe void PIXEndEventOnCommandList(ComPtr<ID3D12GraphicsCommandList7> commandList)\n    {\n        PIXEndEventOnCommandList((nint) commandList.Handle);","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/engine/Stride.Graphics/Direct3D12/WinPixNative.cs#L88-L124","documentation":"Thrown by WinPixNative.LoadPixGpuCapturer when the \"Microsoft PIX\" directory exists but contains no versioned subdirectories, so no WinPixGpuCapturer.dll path can be produced. It indicates a broken or partial PIX installation.","triggerScenarios":"PIX directory exists under Program Files but is empty or contains only non-versioned folders/files — e.g. leftover folder after uninstall, partially completed install, or manually created directory.","commonSituations":"Manual cleanup/rollback of PIX installations; disk cleanup tools removing version folders; enterprise images with stub directories.","solutions":["Reinstall/repair Microsoft PIX so at least one versioned folder containing WinPixGpuCapturer.dll exists.","Delete the leftover empty \"Microsoft PIX\" folder and reinstall cleanly.","Guard the PIX capture init with try/catch on InvalidOperationException and continue without GPU capture."],"exampleFix":"// before\nPixNative.Initialize();\n// after\ntry { PixNative.Initialize(); }\ncatch (InvalidOperationException ex) { log.Warn(\"PIX capture unavailable: \" + ex.Message); }","handlingStrategy":"fallback","validationCode":"var pixDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), \"Microsoft PIX\");\nvar hasVersion = Directory.Exists(pixDir) && Directory.EnumerateDirectories(pixDir).Any();\nif (!hasVersion) { log.Warn(\"No usable PIX version found; capture disabled\"); return; }","typeGuard":"bool HasPixVersion() =>\n    Directory.Exists(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), \"Microsoft PIX\"))\n    && Directory.EnumerateDirectories(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), \"Microsoft PIX\")).Any();","tryCatchPattern":"try { WinPixNative.Initialize(); }\ncatch (InvalidOperationException ex) { log.Warn(\"PIX install broken: \" + ex.Message); }","preventionTips":["Repair or reinstall PIX if its Program Files folder is empty or partial.","Avoid manually deleting version folders inside the PIX installation.","Treat PIX capture as optional and degrade gracefully when unusable."],"tags":["windows","pix","gpu-capture","broken-installation"],"backgroundTag":"directory-not-found","analyzedSha":"96fad776d210c221682aac1ccdf4c79dc046fc38","analyzedAt":"2026-09-14T02:59:31.279Z","contentChangedAt":"2026-09-14T02:59:31.279Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}