If you prefer not to use the GitHub package, you can configure your project to reference the assemblies and uploader directly. To do this, download and set up the necessary files, update the .csproj
file, and restore the required NuGet packages.
- Download the
Lib.zip
andTraceUpload.zip
files from the releases. - Unzip only the
Lib.zip
file. Copy the folder to the project directory where the.csproj
file is located. - Create a folder named
ServiceProfiler
in the project directory and place theTraceUpload.zip
file inside this folder.
-
Add the following lines to reference the assemblies:
<ItemGroup> <Reference Include="Lib/*.dll" /> </ItemGroup>
-
Add the following lines to ensure the
TraceUploader.zip
file is copied to the output directory:<ItemGroup> <None Update="ServiceProfiler/TraceUpload.zip"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> </ItemGroup>
To install the necessary packages, run the following commands:
dotnet add package Azure.Core
dotnet add package Azure.Monitor.OpenTelemetry.AspNetCore --version 1.3.0-beta.2
dotnet add package CommandLineParser
dotnet add package Microsoft.AspNetCore.OpenApi
dotnet add package Microsoft.Diagnostics.NETCore.Client
dotnet add package Microsoft.Extensions.Configuration.Abstractions
dotnet add package Microsoft.Extensions.Configuration.Binder
dotnet add package Microsoft.Extensions.Hosting.Abstractions
dotnet add package Microsoft.Extensions.Logging.Abstractions
dotnet add package Microsoft.Extensions.Options
dotnet add package OpenTelemetry
dotnet add package Swashbuckle.AspNetCore
dotnet add package System.Collections.Immutable
dotnet add package System.Text.Json