From 2cbe2d7bdc20210838fef5ba9a6fcd1da7f82db9 Mon Sep 17 00:00:00 2001 From: Kyle Reed Date: Wed, 19 Nov 2025 16:03:55 -0800 Subject: [PATCH 1/5] Update for .NET Core 8 Clean up the netcore vcxproj files --- ...t.O365.Security.Native.ETW.NetCore.vcxproj | 318 ++++-------------- ...Microsoft.O365.Security.Native.ETW.vcxproj | 298 +++------------- .../ManagedExamples/ManagedExamples.csproj | 4 +- tests/ManagedETWTests/EtwTestsCS.csproj | 4 +- 4 files changed, 108 insertions(+), 516 deletions(-) diff --git a/Microsoft.O365.Security.Native.ETW.NetCore/Microsoft.O365.Security.Native.ETW.NetCore.vcxproj b/Microsoft.O365.Security.Native.ETW.NetCore/Microsoft.O365.Security.Native.ETW.NetCore.vcxproj index c17f754..97de04e 100644 --- a/Microsoft.O365.Security.Native.ETW.NetCore/Microsoft.O365.Security.Native.ETW.NetCore.vcxproj +++ b/Microsoft.O365.Security.Native.ETW.NetCore/Microsoft.O365.Security.Native.ETW.NetCore.vcxproj @@ -34,9 +34,10 @@ x64 + {9DE6788C-5759-4A75-B484-ABA4C7EF5F08} - net6.0 + net8.0 NetCoreCProj ETWLib Microsoft.O365.Security.Native.ETW.NetCore @@ -49,153 +50,66 @@ true $(SolutionDir)$(Platform)\$(Configuration)\$(TargetFramework)\ - - - - + + - - v143 - NetCore - DynamicLibrary - Unicode + + + + Debug - - v143 - NetCore - DynamicLibrary - Unicode + + Release - - v143 - NetCore - DynamicLibrary - Unicode + + True - + + + v143 NetCore DynamicLibrary Unicode + $(SolutionDir);$(VC_IncludePath);$(WindowsSDK_IncludePath); + + false - - v143 - DynamicLibrary - NetCore - Spectre - - - v143 - DynamicLibrary - NetCore - Spectre + + + + false - - v143 - DynamicLibrary - NetCore + + + Spectre - - v143 - DynamicLibrary - NetCore - Spectre + + + + $(SolutionDir)..\35MSSharedLib1024.snk + true + - - - false - $(SolutionDir);$(VC_IncludePath);$(WindowsSDK_IncludePath); - true - - - - - false - $(SolutionDir);$(VC_IncludePath);$(WindowsSDK_IncludePath); - true - - - - - false - $(SolutionDir);$(VC_IncludePath);$(WindowsSDK_IncludePath); - true - $(SolutionDir)..\35MSSharedLib1024.snk - true - - - false - $(SolutionDir);$(VC_IncludePath);$(WindowsSDK_IncludePath); - true - $(SolutionDir)..\35MSSharedLib1024.snk - true - - - $(SolutionDir);$(VC_IncludePath);$(WindowsSDK_IncludePath) - - - - - $(SolutionDir);$(VC_IncludePath);$(WindowsSDK_IncludePath) - - - - - $(SolutionDir);$(VC_IncludePath);$(WindowsSDK_IncludePath) - $(SolutionDir)..\35MSSharedLib1024.snk - true - - - $(SolutionDir);$(VC_IncludePath);$(WindowsSDK_IncludePath) - $(SolutionDir)..\35MSSharedLib1024.snk - true - - - - TYPEASSERT;_DEBUG;UNICODE;_WINDLL;%(PreprocessorDefinitions) - Level4 - true - MultiThreadedDebugDLL - $(ProjectDir)..\inc;$(ProjectDir)..\krabs;%(AdditionalIncludeDirectories) - true - stdcpp17 - - - true - true - - - if not exist $(ProjectDir)..\35MSSharedLib1024.snk sn.exe -k $(ProjectDir)..\35MSSharedLib1024.snk - - - Verify snk file is generated - - - sign - - - + + + - TYPEASSERT;_DEBUG;UNICODE;_WINDLL;%(PreprocessorDefinitions) + UNICODE;_WINDLL;%(PreprocessorDefinitions) Level4 true - MultiThreadedDebugDLL $(ProjectDir)..\inc;$(ProjectDir)..\krabs;%(AdditionalIncludeDirectories) true stdcpp17 + 4679 true - true if not exist $(ProjectDir)..\35MSSharedLib1024.snk sn.exe -k $(ProjectDir)..\35MSSharedLib1024.snk @@ -207,163 +121,45 @@ sign - + + + - TYPEASSERT;_DEBUG;UNICODE;_WINDLL;%(PreprocessorDefinitions) - Level4 - true + TYPEASSERT;_DEBUG;%(PreprocessorDefinitions) MultiThreadedDebugDLL - $(ProjectDir)..\inc;$(ProjectDir)..\krabs;%(AdditionalIncludeDirectories) - true - stdcpp17 - true true - - if not exist $(ProjectDir)..\35MSSharedLib1024.snk sn.exe -k $(ProjectDir)..\35MSSharedLib1024.snk - - - Verify snk file is generated - - - sign - - + + + - TYPEASSERT;_DEBUG;UNICODE;_WINDLL;%(PreprocessorDefinitions) - Level4 - true + NDEBUG;%(PreprocessorDefinitions) MultiThreadedDebugDLL - $(ProjectDir)..\inc;$(ProjectDir)..\krabs;%(AdditionalIncludeDirectories) - true - stdcpp17 - true true - - if not exist $(ProjectDir)..\35MSSharedLib1024.snk sn.exe -k $(ProjectDir)..\35MSSharedLib1024.snk - - - Verify snk file is generated - - - sign - - - - - Level4 - - - - - Level4 - - - - - Level4 - - - - - Level4 - - - - - true - NDEBUG;UNICODE;_WINDLL;%(PreprocessorDefinitions) - $(ProjectDir)..\inc;$(ProjectDir)..\krabs;%(AdditionalIncludeDirectories) - true - stdcpp17 - - - true - - - if not exist $(ProjectDir)..\35MSSharedLib1024.snk sn.exe -k $(ProjectDir)..\35MSSharedLib1024.snk - - - Verify snk file is generated - - - sign - - - - - true - NDEBUG;UNICODE;_WINDLL;%(PreprocessorDefinitions) - $(ProjectDir)..\inc;$(ProjectDir)..\krabs;%(AdditionalIncludeDirectories) - true - stdcpp17 - - - true - - - if not exist $(ProjectDir)..\35MSSharedLib1024.snk sn.exe -k $(ProjectDir)..\35MSSharedLib1024.snk - - - Verify snk file is generated - - - sign - - - - - true - NDEBUG;UNICODE;_WINDLL;%(PreprocessorDefinitions) - $(ProjectDir)..\inc;$(ProjectDir)..\krabs;%(AdditionalIncludeDirectories) - true - stdcpp17 - - - true - - - if not exist $(ProjectDir)..\35MSSharedLib1024.snk sn.exe -k $(ProjectDir)..\35MSSharedLib1024.snk - - - Verify snk file is generated - - - sign - - - - - true - NDEBUG;UNICODE;_WINDLL;%(PreprocessorDefinitions) - $(ProjectDir)..\inc;$(ProjectDir)..\krabs;%(AdditionalIncludeDirectories) - true - stdcpp17 - - - true - - - if not exist $(ProjectDir)..\35MSSharedLib1024.snk sn.exe -k $(ProjectDir)..\35MSSharedLib1024.snk - - - Verify snk file is generated - - - sign - + + + + - \ No newline at end of file + + + + + + + diff --git a/Microsoft.O365.Security.Native.ETW/Microsoft.O365.Security.Native.ETW.vcxproj b/Microsoft.O365.Security.Native.ETW/Microsoft.O365.Security.Native.ETW.vcxproj index ac5b87f..edda362 100644 --- a/Microsoft.O365.Security.Native.ETW/Microsoft.O365.Security.Native.ETW.vcxproj +++ b/Microsoft.O365.Security.Native.ETW/Microsoft.O365.Security.Native.ETW.vcxproj @@ -34,6 +34,7 @@ x64 + {ED4E6027-541F-440A-A5EE-15DBB7B89423} v4.6.2 @@ -46,145 +47,65 @@ true $(SolutionDir)$(Platform)\$(Configuration)\net462\ + + - - v143 - true - DynamicLibrary - Unicode + + + + Debug - - v143 - true - DynamicLibrary - Unicode + + Release - - v143 - true - DynamicLibrary - Unicode + + True - + + + v143 true DynamicLibrary Unicode + $(SolutionDir);$(VC_IncludePath);$(WindowsSDK_IncludePath); + + false - - v143 - DynamicLibrary - true - Spectre - - - v143 - DynamicLibrary - true - Spectre + + + + false - - v143 - DynamicLibrary - true + + + Spectre - - v143 - DynamicLibrary - true - Spectre + + + + $(SolutionDir)..\35MSSharedLib1024.snk + true + - - - false - $(SolutionDir);$(VC_IncludePath);$(WindowsSDK_IncludePath); - true - - - - - false - $(SolutionDir);$(VC_IncludePath);$(WindowsSDK_IncludePath); - true - - - - - false - $(SolutionDir);$(VC_IncludePath);$(WindowsSDK_IncludePath); - true - $(SolutionDir)..\35MSSharedLib1024.snk - true - - - false - $(SolutionDir);$(VC_IncludePath);$(WindowsSDK_IncludePath); - true - $(SolutionDir)..\35MSSharedLib1024.snk - true - - - $(SolutionDir);$(VC_IncludePath);$(WindowsSDK_IncludePath) - - - - - $(SolutionDir);$(VC_IncludePath);$(WindowsSDK_IncludePath) - - - - - $(SolutionDir);$(VC_IncludePath);$(WindowsSDK_IncludePath) - $(SolutionDir)..\35MSSharedLib1024.snk - true - - - $(SolutionDir);$(VC_IncludePath);$(WindowsSDK_IncludePath) - $(SolutionDir)..\35MSSharedLib1024.snk - true - - - - TYPEASSERT;_DEBUG;UNICODE;_WINDLL;%(PreprocessorDefinitions) - Level4 - true - MultiThreadedDebugDLL - $(ProjectDir)..\inc;$(ProjectDir)..\krabs;%(AdditionalIncludeDirectories) - true - stdcpp17 - - - true - true - - - if not exist $(ProjectDir)..\35MSSharedLib1024.snk sn.exe -k $(ProjectDir)..\35MSSharedLib1024.snk - - - Verify snk file is generated - - - sign - - - + + + - TYPEASSERT;_DEBUG;UNICODE;_WINDLL;%(PreprocessorDefinitions) + UNICODE;_WINDLL;%(PreprocessorDefinitions) Level4 true - MultiThreadedDebugDLL $(ProjectDir)..\inc;$(ProjectDir)..\krabs;%(AdditionalIncludeDirectories) true stdcpp17 true - true if not exist $(ProjectDir)..\35MSSharedLib1024.snk sn.exe -k $(ProjectDir)..\35MSSharedLib1024.snk @@ -196,167 +117,40 @@ sign - + + + - TYPEASSERT;_DEBUG;UNICODE;_WINDLL;%(PreprocessorDefinitions) - Level4 - true + TYPEASSERT;_DEBUG;%(PreprocessorDefinitions) MultiThreadedDebugDLL - $(ProjectDir)..\inc;$(ProjectDir)..\krabs;%(AdditionalIncludeDirectories) - true - stdcpp17 - true true - - if not exist $(ProjectDir)..\35MSSharedLib1024.snk sn.exe -k $(ProjectDir)..\35MSSharedLib1024.snk - - - Verify snk file is generated - - - sign - - + + + - TYPEASSERT;_DEBUG;UNICODE;_WINDLL;%(PreprocessorDefinitions) - Level4 - true + NDEBUG;%(PreprocessorDefinitions) MultiThreadedDebugDLL - $(ProjectDir)..\inc;$(ProjectDir)..\krabs;%(AdditionalIncludeDirectories) - true - stdcpp17 - true true - - if not exist $(ProjectDir)..\35MSSharedLib1024.snk sn.exe -k $(ProjectDir)..\35MSSharedLib1024.snk - - - Verify snk file is generated - - - sign - - - - - Level4 - - - - - Level4 - - - - - Level4 - - - - - Level4 - - - - - true - NDEBUG;UNICODE;_WINDLL;%(PreprocessorDefinitions) - $(ProjectDir)..\inc;$(ProjectDir)..\krabs;%(AdditionalIncludeDirectories) - true - stdcpp17 - - - true - - - if not exist $(ProjectDir)..\35MSSharedLib1024.snk sn.exe -k $(ProjectDir)..\35MSSharedLib1024.snk - - - Verify snk file is generated - - - sign - - - - - true - NDEBUG;UNICODE;_WINDLL;%(PreprocessorDefinitions) - $(ProjectDir)..\inc;$(ProjectDir)..\krabs;%(AdditionalIncludeDirectories) - true - stdcpp17 - - - true - - - if not exist $(ProjectDir)..\35MSSharedLib1024.snk sn.exe -k $(ProjectDir)..\35MSSharedLib1024.snk - - - Verify snk file is generated - - - sign - - - - - true - NDEBUG;UNICODE;_WINDLL;%(PreprocessorDefinitions) - $(ProjectDir)..\inc;$(ProjectDir)..\krabs;%(AdditionalIncludeDirectories) - true - stdcpp17 - - - true - - - if not exist $(ProjectDir)..\35MSSharedLib1024.snk sn.exe -k $(ProjectDir)..\35MSSharedLib1024.snk - - - Verify snk file is generated - - - sign - - - - - true - NDEBUG;UNICODE;_WINDLL;%(PreprocessorDefinitions) - $(ProjectDir)..\inc;$(ProjectDir)..\krabs;%(AdditionalIncludeDirectories) - true - stdcpp17 - - - true - - - if not exist $(ProjectDir)..\35MSSharedLib1024.snk sn.exe -k $(ProjectDir)..\35MSSharedLib1024.snk - - - Verify snk file is generated - - - sign - + + + @@ -390,10 +184,12 @@ + + \ No newline at end of file diff --git a/examples/ManagedExamples/ManagedExamples.csproj b/examples/ManagedExamples/ManagedExamples.csproj index 1eb05a0..6978602 100644 --- a/examples/ManagedExamples/ManagedExamples.csproj +++ b/examples/ManagedExamples/ManagedExamples.csproj @@ -4,7 +4,7 @@ Exe ManagedExamples ManagedExamples - net462;net6.0-windows + net462;net8.0-windows Microsoft Corporation © Microsoft Corporation. All rights reserved. Debug;DebugSigning;Release;ReleaseSigning @@ -39,7 +39,7 @@ - + diff --git a/tests/ManagedETWTests/EtwTestsCS.csproj b/tests/ManagedETWTests/EtwTestsCS.csproj index c66b445..42c8cdd 100644 --- a/tests/ManagedETWTests/EtwTestsCS.csproj +++ b/tests/ManagedETWTests/EtwTestsCS.csproj @@ -1,7 +1,7 @@  - net462;net6.0 + net462;net8.0 Microsoft Corporation © Microsoft Corporation. All rights reserved. AnyCPU;x64;ARM64 @@ -18,7 +18,7 @@ - + From ef7b83966886bcb4d2662d5b7fcdcaa72656f04b Mon Sep 17 00:00:00 2001 From: Kyle Reed Date: Wed, 19 Nov 2025 16:23:57 -0800 Subject: [PATCH 2/5] Update test assembly path --- .github/workflows/krabsetw.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/krabsetw.yml b/.github/workflows/krabsetw.yml index 597b3a4..ff09c2b 100644 --- a/.github/workflows/krabsetw.yml +++ b/.github/workflows/krabsetw.yml @@ -31,4 +31,4 @@ jobs: - name: test debug net462 run: vstest.console.exe tests\ManagedETWTests\bin\x64\Debug\net462\EtwTestsCS.dll - name: test debug net6.0 - run: vstest.console.exe tests\ManagedETWTests\bin\x64\Debug\net6.0\EtwTestsCS.dll + run: vstest.console.exe tests\ManagedETWTests\bin\x64\Debug\net8.0\EtwTestsCS.dll From 4fd4d0fc856e8bca1326cd32d0f7fcf99cb77436 Mon Sep 17 00:00:00 2001 From: Kyle Reed Date: Wed, 19 Nov 2025 16:28:50 -0800 Subject: [PATCH 3/5] Don't define a runtime lib in release builds (this is how it was before) --- .../Microsoft.O365.Security.Native.ETW.NetCore.vcxproj | 1 - .../Microsoft.O365.Security.Native.ETW.vcxproj | 1 - 2 files changed, 2 deletions(-) diff --git a/Microsoft.O365.Security.Native.ETW.NetCore/Microsoft.O365.Security.Native.ETW.NetCore.vcxproj b/Microsoft.O365.Security.Native.ETW.NetCore/Microsoft.O365.Security.Native.ETW.NetCore.vcxproj index 97de04e..92f053e 100644 --- a/Microsoft.O365.Security.Native.ETW.NetCore/Microsoft.O365.Security.Native.ETW.NetCore.vcxproj +++ b/Microsoft.O365.Security.Native.ETW.NetCore/Microsoft.O365.Security.Native.ETW.NetCore.vcxproj @@ -137,7 +137,6 @@ NDEBUG;%(PreprocessorDefinitions) - MultiThreadedDebugDLL true diff --git a/Microsoft.O365.Security.Native.ETW/Microsoft.O365.Security.Native.ETW.vcxproj b/Microsoft.O365.Security.Native.ETW/Microsoft.O365.Security.Native.ETW.vcxproj index edda362..1e019bf 100644 --- a/Microsoft.O365.Security.Native.ETW/Microsoft.O365.Security.Native.ETW.vcxproj +++ b/Microsoft.O365.Security.Native.ETW/Microsoft.O365.Security.Native.ETW.vcxproj @@ -133,7 +133,6 @@ NDEBUG;%(PreprocessorDefinitions) - MultiThreadedDebugDLL true From 71d5a58b61b46de3c19c7e8a532fddc9034fd56f Mon Sep 17 00:00:00 2001 From: Kyle Reed Date: Wed, 19 Nov 2025 16:33:54 -0800 Subject: [PATCH 4/5] Remove assemblyDebug from release builds --- .../Microsoft.O365.Security.Native.ETW.NetCore.vcxproj | 3 --- 1 file changed, 3 deletions(-) diff --git a/Microsoft.O365.Security.Native.ETW.NetCore/Microsoft.O365.Security.Native.ETW.NetCore.vcxproj b/Microsoft.O365.Security.Native.ETW.NetCore/Microsoft.O365.Security.Native.ETW.NetCore.vcxproj index 92f053e..446dbb5 100644 --- a/Microsoft.O365.Security.Native.ETW.NetCore/Microsoft.O365.Security.Native.ETW.NetCore.vcxproj +++ b/Microsoft.O365.Security.Native.ETW.NetCore/Microsoft.O365.Security.Native.ETW.NetCore.vcxproj @@ -138,9 +138,6 @@ NDEBUG;%(PreprocessorDefinitions) - - true - From 000fc3a2be6380d5581fda8d6d79712b57143b7f Mon Sep 17 00:00:00 2001 From: Kyle Reed Date: Wed, 19 Nov 2025 16:39:03 -0800 Subject: [PATCH 5/5] Remember to actually save file after changing it --- .../Microsoft.O365.Security.Native.ETW.vcxproj | 3 --- 1 file changed, 3 deletions(-) diff --git a/Microsoft.O365.Security.Native.ETW/Microsoft.O365.Security.Native.ETW.vcxproj b/Microsoft.O365.Security.Native.ETW/Microsoft.O365.Security.Native.ETW.vcxproj index 1e019bf..d13e37d 100644 --- a/Microsoft.O365.Security.Native.ETW/Microsoft.O365.Security.Native.ETW.vcxproj +++ b/Microsoft.O365.Security.Native.ETW/Microsoft.O365.Security.Native.ETW.vcxproj @@ -134,9 +134,6 @@ NDEBUG;%(PreprocessorDefinitions) - - true -