Skip to content

Commit

Permalink
Build TraceEvent NuGet package
Browse files Browse the repository at this point in the history
  • Loading branch information
sharwell committed May 21, 2017
1 parent 9efe757 commit 0e0bfd4
Show file tree
Hide file tree
Showing 6 changed files with 104 additions and 0 deletions.
1 change: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ cache:
artifacts:
- path: 'src\PerfView\bin\$(configuration)\PerfView.exe'
- path: 'src\PerfView64\bin\$(configuration)\PerfView64.exe'
- path: 'src\TraceEvent\bin\$(configuration)\*.nupkg'
54 changes: 54 additions & 0 deletions src/TraceEvent/Microsoft.Diagnostics.Tracing.TraceEvent.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?xml version="1.0"?>
<package>
<metadata minClientVersion="2.5">
<id>Microsoft.Diagnostics.Tracing.TraceEvent</id>
<version>0.0.0</version>
<title>Microsoft TraceEvent Library</title>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
<licenseUrl>http://go.microsoft.com/fwlink/?LinkId=329770</licenseUrl>
<iconUrl>http://go.microsoft.com/fwlink/?LinkID=288859</iconUrl>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<description>
Event Tracing for Windows (ETW) is a powerful logging mechanism built into the Windows OS and is used extensively in Windows. You can also log ETW events yourself code using the System.Diagnostics.Tracing.EventSource class.

The TraceEvent library conains the classes needed to control ETW providers (including EventSources) and parse the events they emit.

The library includes
-- TraceEventSession which can enable ETW providers,
-- EtwTraceEventSource which lets you read the stream of ETW events, and
-- TraceLog which is is digested form of ETW events which include decoded stack traces associated with the events.
-- A Programmers Guide for using the classes above.

Also see the TraceEvent Samples NuGet package for example uses of this library.
</description>
<summary>TraceEvent is a .NET Framework library for capturing and analyzing ETW events.</summary>
<releaseNotes>https://github.com/Microsoft/perfview/releases/tag/V$version$</releaseNotes>
<copyright>Copyright © Microsoft Corporation</copyright>
<tags>TraceEvent EvenSource Microsoft ETW Event Tracing for Windows</tags>
</metadata>

<files>
<!-- User information -->
<!--<file src="License-Stable.rtf" target="License-Stable.rtf" />-->
<file src="ReadMe.txt" target="ReadMe.txt" />
<file src="ReleaseNotes.txt" target="ReleaseNotes.txt" />

<!-- Support for native binaries -->
<file src="Microsoft.Diagnostics.Tracing.TraceEvent.targets" target="build\Microsoft.Diagnostics.Tracing.TraceEvent.targets" />

<!-- Native binaries -->
<file src="$OutDir$amd64\KernelTraceControl.dll" target="lib\native\amd64\KernelTraceControl.dll" />
<file src="$OutDir$amd64\msdia140.dll" target="lib\native\amd64\msdia140.dll" />
<file src="$OutDir$x86\KernelTraceControl.dll" target="lib\native\x86\KernelTraceControl.dll" />
<file src="$OutDir$x86\msdia140.dll" target="lib\native\x86\msdia140.dll" />

<!-- Libraries and sources -->
<file src="$OutDir$Microsoft.Diagnostics.Tracing.TraceEvent.dll" target="lib\net45" />
<file src="$OutDir$Microsoft.Diagnostics.Tracing.TraceEvent.xml" target="lib\net45" />
<file src="$OutDir$Microsoft.Diagnostics.Tracing.TraceEvent.pdb" target="lib\net45" />
<file exclude="obj\**\*.cs" src="**\*.cs" target="src" />
<file src="obj\$Configuration$\**\*.cs" target="src\obj\$Configuration$" />
</files>

</package>
37 changes: 37 additions & 0 deletions src/TraceEvent/Microsoft.Diagnostics.Tracing.TraceEvent.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!--
***********************************************************************************************
Microsoft.Bcl.Compression.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (C) Microsoft Corporation. All rights reserved.
***********************************************************************************************
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="TraceEventInjectReference" BeforeTargets="ResolveAssemblyReferences" Condition="('$(DesignTimeBuild)' != 'true')">
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)..\lib\native\x86\KernelTraceControl.dll">
<Link>x86\KernelTraceControl.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>False</Visible>
</None>
<None Include="$(MSBuildThisFileDirectory)..\lib\native\x86\msdia140.dll">
<Link>x86\msdia140.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>False</Visible>
</None>
<None Include="$(MSBuildThisFileDirectory)..\lib\native\amd64\KernelTraceControl.dll">
<Link>amd64\KernelTraceControl.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>False</Visible>
</None>
<None Include="$(MSBuildThisFileDirectory)..\lib\native\amd64\msdia140.dll">
<Link>amd64\msdia140.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>False</Visible>
</None>
</ItemGroup>
</Target>
</Project>
3 changes: 3 additions & 0 deletions src/TraceEvent/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@
[assembly: NeutralResourcesLanguage("en")]

// [assembly: InternalsVisibleTo("PerfView")]
[assembly: AssemblyVersion("1.0.42.0")]
[assembly: AssemblyFileVersion("1.0.42")]
[assembly: AssemblyInformationalVersion("1.0.42-dev")]
7 changes: 7 additions & 0 deletions src/TraceEvent/TraceEvent.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\packages\Tvl.NuGet.BuildTasks.1.0.0-alpha002\build\Tvl.NuGet.BuildTasks.props" Condition="Exists('..\..\packages\Tvl.NuGet.BuildTasks.1.0.0-alpha002\build\Tvl.NuGet.BuildTasks.props')" />
<Import Project="..\..\packages\Microsoft.Diagnostics.Tracing.TraceEvent.SupportFiles.1.0.2\build\Microsoft.Diagnostics.Tracing.TraceEvent.SupportFiles.props" Condition="Exists('..\..\packages\Microsoft.Diagnostics.Tracing.TraceEvent.SupportFiles.1.0.2\build\Microsoft.Diagnostics.Tracing.TraceEvent.SupportFiles.props')" />
<PropertyGroup>
<PerfLibRootPath>$(MSBuildThisFileDirectory)\..</PerfLibRootPath>
Expand Down Expand Up @@ -162,6 +163,9 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<NuGetManifest Include="Microsoft.Diagnostics.Tracing.TraceEvent.nuspec">
<Symbols>true</Symbols>
</NuGetManifest>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(PerfLibRootPath)\PerfLib.targets" />
Expand All @@ -170,5 +174,8 @@
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\Microsoft.Diagnostics.Tracing.TraceEvent.SupportFiles.1.0.2\build\Microsoft.Diagnostics.Tracing.TraceEvent.SupportFiles.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Diagnostics.Tracing.TraceEvent.SupportFiles.1.0.2\build\Microsoft.Diagnostics.Tracing.TraceEvent.SupportFiles.props'))" />
<Error Condition="!Exists('..\..\packages\Tvl.NuGet.BuildTasks.1.0.0-alpha002\build\Tvl.NuGet.BuildTasks.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Tvl.NuGet.BuildTasks.1.0.0-alpha002\build\Tvl.NuGet.BuildTasks.props'))" />
<Error Condition="!Exists('..\..\packages\Tvl.NuGet.BuildTasks.1.0.0-alpha002\build\Tvl.NuGet.BuildTasks.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Tvl.NuGet.BuildTasks.1.0.0-alpha002\build\Tvl.NuGet.BuildTasks.targets'))" />
</Target>
<Import Project="..\..\packages\Tvl.NuGet.BuildTasks.1.0.0-alpha002\build\Tvl.NuGet.BuildTasks.targets" Condition="Exists('..\..\packages\Tvl.NuGet.BuildTasks.1.0.0-alpha002\build\Tvl.NuGet.BuildTasks.targets')" />
</Project>
2 changes: 2 additions & 0 deletions src/TraceEvent/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Diagnostics.Tracing.TraceEvent.SupportFiles" version="1.0.2" targetFramework="net45" />
<package id="NuGet.CommandLine" version="2.8.3" targetFramework="net45" />
<package id="Tvl.NuGet.BuildTasks" version="1.0.0-alpha002" targetFramework="net45" developmentDependency="true" />
</packages>

0 comments on commit 0e0bfd4

Please sign in to comment.