Skip to content

Commit

Permalink
Merge pull request #1856 from brianrob/dev/brianrob/perfview-nuget-pa…
Browse files Browse the repository at this point in the history
…ckage

Create a NuGet Package For PerfView
  • Loading branch information
brianrob authored Apr 12, 2023
2 parents 327af9e + 494b5bd commit 354b575
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 7 deletions.
2 changes: 1 addition & 1 deletion PerfView.sln
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PerfViewCollect", "src\Perf
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TraceEventSamples", "src\TraceEvent\Samples\TraceEventSamples.csproj", "{2D5418E0-6513-4285-8B0D-53A30CBEF242}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TraceEventPackageSigning", "src\TraceEventPackageSigning\TraceEventPackageSigning.csproj", "{121D62F5-0BB7-4DB5-8742-454127DF31F4}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NuGetPackageSigning", "src\NuGetPackageSigning\NuGetPackageSigning.csproj", "{121D62F5-0BB7-4DB5-8742-454127DF31F4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Utilities", "src\Utilities\Utilities.csproj", "{BBF0A803-0B1C-47F2-B60F-09A5C4DB2136}"
EndProject
Expand Down
8 changes: 8 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,12 @@
<NoWarn>$(NoWarn),1573,1591</NoWarn>
</PropertyGroup>

<!--
Don't add synthetic project references for solution dependencies.
This is required to build the PerfView NuGet package.
-->
<PropertyGroup>
<AddSyntheticProjectReferencesForSolutionDependencies>false</AddSyntheticProjectReferencesForSolutionDependencies>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<!-- This project is here only to support MicroBuild Signing of the Microsoft.Diagnostics.Tracing.TraceEvent package.
In theory this could be rold into the TraceEvent.csproj project, but after several attempts (the last
of which were that the fact that we build for several frameworks, makes it so that it can't seem to load
the microbuild package from the PackageReference element propertly. If we care we can make another
attempt, but this should get us unblocked. See issue https://github.com/Microsoft/perfview/issues/673 for more.
-->
<!-- This project is here only to support MicroBuild Signing of the NuGet packages. -->

<PropertyGroup>
<OutputType>library</OutputType>
Expand All @@ -18,6 +13,11 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>

<!-- Get the Microsoft.PerfView.*.nuget package we just built -->
<None Include="..\PerfView\bin\$(Configuration)\Microsoft.PerfView.*nupkg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>

<!-- Get the Microsoft.Diagnostics.TraceEvent.*.nuget package we just built -->
<None Include="..\TraceEvent\bin\$(Configuration)\Microsoft.Diagnostics.Tracing.TraceEvent.*nupkg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand Down
22 changes: 22 additions & 0 deletions src/PerfView/PerfView.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,28 @@
</AssemblyAttribute>
</ItemGroup>

<!-- Build a NuGet package containing PerfView.exe -->
<PropertyGroup>
<Description>PerfView</Description>
<Company>Microsoft</Company>
<Copyright>Copyright © Microsoft 2010</Copyright>
<Version>$(PerfViewVersion)</Version>
<FileVersion>$(PerfViewVersion)</FileVersion>
<InformationalVersion>$(PerfViewVersion)</InformationalVersion>
<NeutralLanguage>en</NeutralLanguage>

<GeneratePackageOnBuild>true</GeneratePackageOnBuild>

<NuspecFile>PerfView.nuspec</NuspecFile>
<GenerateNuspecDependsOn>$(GenerateNuspecDependsOn);SetNuspecProperties</GenerateNuspecDependsOn>
</PropertyGroup>

<Target Name="SetNuspecProperties">
<PropertyGroup>
<NuspecProperties>Configuration=$(Configuration);version=$(PerfViewVersion);OutDir=$(OutputPath)</NuspecProperties>
</PropertyGroup>
</Target>

<ItemGroup>
<SuggestedBindingRedirects Include="Microsoft.Diagnostics.Tracing.TraceEvent, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<MaxVersion>$(TraceEventVersion).0</MaxVersion>
Expand Down
27 changes: 27 additions & 0 deletions src/PerfView/PerfView.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0"?>
<package>
<metadata minClientVersion="2.5">
<id>Microsoft.PerfView</id>
<version>0.0.0</version>
<title>Microsoft PerfView</title>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
<projectUrl>https://github.com/Microsoft/perfview</projectUrl>
<license type="expression">MIT</license>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<description>
PerfView is a free performance-analysis tool that helps isolate CPU and memory-related performance issues.
It is a Windows tool, but it also has some support for analyzing data collected on Linux machines.
It works for a wide variety of scenarios, but has a number of special features for investigating performance issues in code written for the .NET runtime.
</description>
<summary>PerfView is a free performance-analysis tool that helps isolate CPU and memory-related performance issues.</summary>
<releaseNotes>https://github.com/Microsoft/perfview/releases/tag/v$version$</releaseNotes>
<copyright>© Microsoft Corporation. All rights reserved.</copyright>
<tags>Perfview Microsoft ETW Event Tracing for Windows</tags>
</metadata>

<files>
<file src="$OutDir$PerfView.exe" target="content\PerfView.exe" />
</files>

</package>

0 comments on commit 354b575

Please sign in to comment.