Skip to content

Commit c222987

Browse files
committed
SDK(C#): add optional System.Diagnostics.DiagnosticSource as a dependency
This only exists on .Net 4.6+, so add it conditionally only when target >Netstandard 2.0 (which includes .Net 4.6). This allows creating activity spans, independently of the tracing framework used. Signed-off-by: Edwin Török <[email protected]>
1 parent cc66500 commit c222987

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ocaml/sdk-gen/csharp/autogen/src/XenServer.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
<ItemGroup>
3131
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
3232
</ItemGroup>
33+
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
34+
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="8.0.1" />
35+
</ItemGroup>
3336
<ItemGroup>
3437
<Compile Update="FriendlyErrorNames.Designer.cs">
3538
<DesignTime>True</DesignTime>

0 commit comments

Comments
 (0)