Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/krabsetw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>

<PropertyGroup Label="Globals">
<ProjectGuid>{9DE6788C-5759-4A75-B484-ABA4C7EF5F08}</ProjectGuid>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Keyword>NetCoreCProj</Keyword>
<RootNamespace>ETWLib</RootNamespace>
<ProjectName>Microsoft.O365.Security.Native.ETW.NetCore</ProjectName>
Expand All @@ -49,129 +50,66 @@
<ReplaceWildcardsInProjectItems>true</ReplaceWildcardsInProjectItems>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(TargetFramework)\</OutDir>
</PropertyGroup>
<!--
Manually creating the path because MSBuild doesn't create this folder which causes:
warning MSB3101: Could not write state file "x64\ReleaseSigning\net6.0\Microsoft.O365.Security.Native.ETW.NetCore.vcxproj.AssemblyReference.cache".
Could not find a part of the path [...]
-->
<Target Name="CreateDirectories" BeforeTargets="PrepareForBuild" >
<MakeDir Directories="$(Platform)\$(Configuration)\$(TargetFramework)\"/>
</Target>

<!-- Import default C++ project properties -->
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<PlatformToolset>v143</PlatformToolset>
<CLRSupport>NetCore</CLRSupport>
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>

<!-- Helper properties -->
<PropertyGroup Condition="'$(Configuration)'=='Debug' Or '$(Configuration)'=='DebugSigning'">
<BaseConfig>Debug</BaseConfig>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<PlatformToolset>v143</PlatformToolset>
<CLRSupport>NetCore</CLRSupport>
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PropertyGroup Condition="'$(Configuration)'=='Release' Or '$(Configuration)'=='ReleaseSigning'">
<BaseConfig>Release</BaseConfig>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugSigning|ARM64'" Label="Configuration">
<PlatformToolset>v143</PlatformToolset>
<CLRSupport>NetCore</CLRSupport>
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PropertyGroup Condition="'$(Configuration)'=='DebugSigning' Or '$(Configuration)'=='ReleaseSigning'">
<SigningEnabled>True</SigningEnabled>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugSigning|x64'" Label="Configuration">

<!-- Default/common properties -->
<PropertyGroup>
<PlatformToolset>v143</PlatformToolset>
<CLRSupport>NetCore</CLRSupport>
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<IncludePath>$(SolutionDir);$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
<LinkKeyFile></LinkKeyFile>
<LinkDelaySign>false</LinkDelaySign>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<PlatformToolset>v143</PlatformToolset>
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CLRSupport>NetCore</CLRSupport>
<SpectreMitigation>Spectre</SpectreMitigation>

<!-- Debug config properties -->
<PropertyGroup Condition="'$(BaseConfig)'=='Debug'">
<EmbedManifest>false</EmbedManifest>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<PlatformToolset>v143</PlatformToolset>
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CLRSupport>NetCore</CLRSupport>

<!-- Release config properties -->
<PropertyGroup Condition="'$(BaseConfig)'=='Release'">
<SpectreMitigation>Spectre</SpectreMitigation>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseSigning|ARM64'" Label="Configuration">
<PlatformToolset>v143</PlatformToolset>
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CLRSupport>NetCore</CLRSupport>
<SpectreMitigation>Spectre</SpectreMitigation>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseSigning|x64'" Label="Configuration">
<PlatformToolset>v143</PlatformToolset>
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CLRSupport>NetCore</CLRSupport>
<SpectreMitigation>Spectre</SpectreMitigation>

<!-- Enable Signing for signing configs -->
<PropertyGroup Condition="'$(SigningEnabled)'=='True'">
<LinkKeyFile>$(SolutionDir)..\35MSSharedLib1024.snk</LinkKeyFile>
<LinkDelaySign>true</LinkDelaySign>
</PropertyGroup>

<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<EmbedManifest>false</EmbedManifest>
<IncludePath>$(SolutionDir);$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
<LinkIncremental>true</LinkIncremental>
<LinkKeyFile>
</LinkKeyFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<EmbedManifest>false</EmbedManifest>
<IncludePath>$(SolutionDir);$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
<LinkIncremental>true</LinkIncremental>
<LinkKeyFile>
</LinkKeyFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugSigning|ARM64'">
<EmbedManifest>false</EmbedManifest>
<IncludePath>$(SolutionDir);$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
<LinkIncremental>true</LinkIncremental>
<LinkKeyFile>$(SolutionDir)..\35MSSharedLib1024.snk</LinkKeyFile>
<LinkDelaySign>true</LinkDelaySign>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugSigning|x64'">
<EmbedManifest>false</EmbedManifest>
<IncludePath>$(SolutionDir);$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
<LinkIncremental>true</LinkIncremental>
<LinkKeyFile>$(SolutionDir)..\35MSSharedLib1024.snk</LinkKeyFile>
<LinkDelaySign>true</LinkDelaySign>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<IncludePath>$(SolutionDir);$(VC_IncludePath);$(WindowsSDK_IncludePath)</IncludePath>
<LinkKeyFile>
</LinkKeyFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<IncludePath>$(SolutionDir);$(VC_IncludePath);$(WindowsSDK_IncludePath)</IncludePath>
<LinkKeyFile>
</LinkKeyFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseSigning|ARM64'">
<IncludePath>$(SolutionDir);$(VC_IncludePath);$(WindowsSDK_IncludePath)</IncludePath>
<LinkKeyFile>$(SolutionDir)..\35MSSharedLib1024.snk</LinkKeyFile>
<LinkDelaySign>true</LinkDelaySign>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseSigning|x64'">
<IncludePath>$(SolutionDir);$(VC_IncludePath);$(WindowsSDK_IncludePath)</IncludePath>
<LinkKeyFile>$(SolutionDir)..\35MSSharedLib1024.snk</LinkKeyFile>
<LinkDelaySign>true</LinkDelaySign>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">

<!-- Default/Common item def -->
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>TYPEASSERT;_DEBUG;UNICODE;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>UNICODE;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<AdditionalIncludeDirectories>$(ProjectDir)..\inc;$(ProjectDir)..\krabs;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<GenerateXMLDocumentationFiles>true</GenerateXMLDocumentationFiles>
<LanguageStandard>stdcpp17</LanguageStandard>
<DisableSpecificWarnings>4679</DisableSpecificWarnings>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AssemblyDebug>true</AssemblyDebug>
</Link>
<PreBuildEvent>
<Command>if not exist $(ProjectDir)..\35MSSharedLib1024.snk sn.exe -k $(ProjectDir)..\35MSSharedLib1024.snk</Command>
Expand All @@ -183,187 +121,41 @@
<Message>sign</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">

<!-- Debug Item Def -->
<ItemDefinitionGroup Condition="'$(BaseConfig)'=='Debug'">
<ClCompile>
<PreprocessorDefinitions>TYPEASSERT;_DEBUG;UNICODE;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<AdditionalIncludeDirectories>$(ProjectDir)..\inc;$(ProjectDir)..\krabs;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<GenerateXMLDocumentationFiles>true</GenerateXMLDocumentationFiles>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AssemblyDebug>true</AssemblyDebug>
</Link>
<PreBuildEvent>
<Command>if not exist $(ProjectDir)..\35MSSharedLib1024.snk sn.exe -k $(ProjectDir)..\35MSSharedLib1024.snk</Command>
</PreBuildEvent>
<PreBuildEvent>
<Message>Verify snk file is generated</Message>
</PreBuildEvent>
<PostBuildEvent>
<Message>sign</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugSigning|ARM64'">
<ClCompile>
<PreprocessorDefinitions>TYPEASSERT;_DEBUG;UNICODE;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<AdditionalIncludeDirectories>$(ProjectDir)..\inc;$(ProjectDir)..\krabs;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<GenerateXMLDocumentationFiles>true</GenerateXMLDocumentationFiles>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AssemblyDebug>true</AssemblyDebug>
</Link>
<PreBuildEvent>
<Command>if not exist $(ProjectDir)..\35MSSharedLib1024.snk sn.exe -k $(ProjectDir)..\35MSSharedLib1024.snk</Command>
</PreBuildEvent>
<PreBuildEvent>
<Message>Verify snk file is generated</Message>
</PreBuildEvent>
<PostBuildEvent>
<Message>sign</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugSigning|x64'">
<ClCompile>
<PreprocessorDefinitions>TYPEASSERT;_DEBUG;UNICODE;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<PreprocessorDefinitions>TYPEASSERT;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<AdditionalIncludeDirectories>$(ProjectDir)..\inc;$(ProjectDir)..\krabs;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<GenerateXMLDocumentationFiles>true</GenerateXMLDocumentationFiles>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AssemblyDebug>true</AssemblyDebug>
</Link>
<PreBuildEvent>
<Command>if not exist $(ProjectDir)..\35MSSharedLib1024.snk sn.exe -k $(ProjectDir)..\35MSSharedLib1024.snk</Command>
</PreBuildEvent>
<PreBuildEvent>
<Message>Verify snk file is generated</Message>
</PreBuildEvent>
<PostBuildEvent>
<Message>sign</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseSigning|ARM64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseSigning|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<ClCompile>
<TreatWarningAsError>true</TreatWarningAsError>
<PreprocessorDefinitions>NDEBUG;UNICODE;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir)..\inc;$(ProjectDir)..\krabs;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<GenerateXMLDocumentationFiles>true</GenerateXMLDocumentationFiles>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<PreBuildEvent>
<Command>if not exist $(ProjectDir)..\35MSSharedLib1024.snk sn.exe -k $(ProjectDir)..\35MSSharedLib1024.snk</Command>
</PreBuildEvent>
<PreBuildEvent>
<Message>Verify snk file is generated</Message>
</PreBuildEvent>
<PostBuildEvent>
<Message>sign</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<TreatWarningAsError>true</TreatWarningAsError>
<PreprocessorDefinitions>NDEBUG;UNICODE;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir)..\inc;$(ProjectDir)..\krabs;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<GenerateXMLDocumentationFiles>true</GenerateXMLDocumentationFiles>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<PreBuildEvent>
<Command>if not exist $(ProjectDir)..\35MSSharedLib1024.snk sn.exe -k $(ProjectDir)..\35MSSharedLib1024.snk</Command>
</PreBuildEvent>
<PreBuildEvent>
<Message>Verify snk file is generated</Message>
</PreBuildEvent>
<PostBuildEvent>
<Message>sign</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseSigning|ARM64'">

<!-- Release Item Def -->
<ItemDefinitionGroup Condition="'$(BaseConfig)'=='Release'">
<ClCompile>
<TreatWarningAsError>true</TreatWarningAsError>
<PreprocessorDefinitions>NDEBUG;UNICODE;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir)..\inc;$(ProjectDir)..\krabs;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<GenerateXMLDocumentationFiles>true</GenerateXMLDocumentationFiles>
<LanguageStandard>stdcpp17</LanguageStandard>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<PreBuildEvent>
<Command>if not exist $(ProjectDir)..\35MSSharedLib1024.snk sn.exe -k $(ProjectDir)..\35MSSharedLib1024.snk</Command>
</PreBuildEvent>
<PreBuildEvent>
<Message>Verify snk file is generated</Message>
</PreBuildEvent>
<PostBuildEvent>
<Message>sign</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseSigning|x64'">
<ClCompile>
<TreatWarningAsError>true</TreatWarningAsError>
<PreprocessorDefinitions>NDEBUG;UNICODE;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir)..\inc;$(ProjectDir)..\krabs;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<GenerateXMLDocumentationFiles>true</GenerateXMLDocumentationFiles>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<PreBuildEvent>
<Command>if not exist $(ProjectDir)..\35MSSharedLib1024.snk sn.exe -k $(ProjectDir)..\35MSSharedLib1024.snk</Command>
</PreBuildEvent>
<PreBuildEvent>
<Message>Verify snk file is generated</Message>
</PreBuildEvent>
<PostBuildEvent>
<Message>sign</Message>
</PostBuildEvent>
</ItemDefinitionGroup>


<ItemGroup>
<ClCompile Include="..\Microsoft.O365.Security.Native.ETW\*.cpp" />
</ItemGroup>

<ItemGroup>
<ClInclude Include="..\Microsoft.O365.Security.Native.ETW\**\*.hpp" />
</ItemGroup>

<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

<!-- Manually creating the path because MSBuild doesn't create this folder which causes:
warning MSB3101: Could not write state file "x64\ReleaseSigning\net8.0\Microsoft.O365.Security.Native.ETW.NetCore.vcxproj.AssemblyReference.cache".
Could not find a part of the path [...] -->
<Target Name="CreateDirectories" BeforeTargets="PrepareForBuild" >
<MakeDir Directories="$(Platform)\$(Configuration)\$(TargetFramework)\"/>
</Target>

</Project>
Loading
Loading