Skip to content

Commit 3c80832

Browse files
authored
Consume Automated Analysis Rules DLL from NuGet (microsoft#1228)
1 parent 5b9665e commit 3c80832

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

src/Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
<PropertyGroup>
3131
<PerfViewSupportFilesVersion>1.0.7</PerfViewSupportFilesVersion>
3232
<MicrosoftDiagnosticsTracingTraceEventSupportFilesVersion>1.0.17</MicrosoftDiagnosticsTracingTraceEventSupportFilesVersion>
33+
<MicrosoftDiagnosticsTracingTraceEventAutomatedAnalysisRulesVersion>0.1.0</MicrosoftDiagnosticsTracingTraceEventAutomatedAnalysisRulesVersion>
3334
<MicrosoftDiagnosticsRuntimeVersion>1.1.37504</MicrosoftDiagnosticsRuntimeVersion>
3435
<XunitVersion>2.3.0</XunitVersion>
3536
<XunitRunnerVisualstudioVersion>2.3.0</XunitRunnerVisualstudioVersion>

src/PerfView/PerfView.csproj

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
<ItemGroup>
5757
<PackageReference Include="Microsoft.Diagnostics.Tracing.TraceEvent.SupportFiles" Version="$(MicrosoftDiagnosticsTracingTraceEventSupportFilesVersion)" PrivateAssets="all" />
5858
<PackageReference Include="PerfView.SupportFiles" Version="$(PerfViewSupportFilesVersion)" PrivateAssets="all" />
59+
<PackageReference Include="Microsoft.Diagnostics.Tracing.TraceEvent.AutomatedAnalysis.Rules" Version="$(MicrosoftDiagnosticsTracingTraceEventAutomatedAnalysisRulesVersion)" PrivateAssets="all"/>
5960

6061
<!-- *** SourceLink Support *** -->
6162
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta-63127-02" PrivateAssets="All" />
@@ -68,6 +69,14 @@
6869
<ProjectReference Include="..\traceEvent\TraceEvent.csproj" />
6970
</ItemGroup>
7071

72+
<!-- Copy AutomatedAnalysis rules to the target directory. -->
73+
<ItemGroup>
74+
<AutomatedAnalysisRules Include="$(TraceEventAutomatedAnalysisRulesBase)Microsoft.Diagnostics.Tracing.TraceEvent.AutomatedAnalysis.Rules.dll" />
75+
</ItemGroup>
76+
<Target Name="CopyRulesToTarget" AfterTargets="Build">
77+
<Copy SourceFiles="@(AutomatedAnalysisRules)" DestinationFolder="$(TargetDir)Rules" />
78+
</Target>
79+
7180
<ItemGroup>
7281
<Compile Include="..\heapDump\GCHeapDump.cs">
7382
<Link>memory\GCHeapDump.cs</Link>
@@ -176,6 +185,13 @@
176185
<Link>amd64\KernelTraceControl.dll</Link>
177186
<Visible>False</Visible>
178187
</EmbeddedResource>
188+
<EmbeddedResource Include="$(TraceEventAutomatedAnalysisRulesBase)Microsoft.Diagnostics.Tracing.TraceEvent.AutomatedAnalysis.Rules.dll">
189+
<Type>Non-Resx</Type>
190+
<WithCulture>false</WithCulture>
191+
<LogicalName>.\Rules\Microsoft.Diagnostics.Tracing.TraceEvent.AutomatedAnalysis.Rules.dll</LogicalName>
192+
<Link>Rules\Microsoft.Diagnostics.Tracing.TraceEvent.AutomatedAnalysis.Rules.dll</Link>
193+
<Visible>False</Visible>
194+
</EmbeddedResource>
179195
<EmbeddedResource Include="$(TraceEventSupportFilesBase)native\amd64\msdia140.dll">
180196
<Type>Non-Resx</Type>
181197
<WithCulture>false</WithCulture>

0 commit comments

Comments
 (0)