diff --git a/cmake/onnxruntime_common.cmake b/cmake/onnxruntime_common.cmake index 372a1cab24..90b54b4079 100644 --- a/cmake/onnxruntime_common.cmake +++ b/cmake/onnxruntime_common.cmake @@ -135,3 +135,7 @@ if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") target_link_libraries(onnxruntime_common rt) endif() endif() + +if (onnxruntime_WINML_NAMESPACE_OVERRIDE STREQUAL "Windows") + target_compile_definitions(onnxruntime_common PRIVATE "BUILD_INBOX=1") +endif() \ No newline at end of file diff --git a/onnxruntime/core/platform/windows/telemetry.cc b/onnxruntime/core/platform/windows/telemetry.cc index 5ab76ce0d1..a0d622b5bf 100644 --- a/onnxruntime/core/platform/windows/telemetry.cc +++ b/onnxruntime/core/platform/windows/telemetry.cc @@ -102,7 +102,10 @@ void WindowsTelemetry::LogProcessInfo() const { // did we already log the process info? we only need to log it once if (process_info_logged.exchange(true)) return; - + bool isRedist = true; +#if BUILD_INBOX + isRedist = false; +#endif TraceLoggingWrite(telemetry_provider_handle, "ProcessInfo", TraceLoggingBool(true, "UTCReplace_AppSessionGuid"), @@ -111,7 +114,7 @@ void WindowsTelemetry::LogProcessInfo() const { // Telemetry info TraceLoggingUInt8(0, "schemaVersion"), TraceLoggingString(ORT_VERSION, "runtimeVersion"), - TraceLoggingBool(true, "isRedist")); + TraceLoggingBool(isRedist, "isRedist")); process_info_logged = true; }