Skip to content

Commit 165daa4

Browse files
committed
CP-44752: 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). On the newer .Net versions this is already included. This allows creating activity spans, independently of the tracing framework used. We use version 8.0.1, because version 9.0.0 doesn't support .Net 6.0 anymore. Signed-off-by: Edwin Török <[email protected]>
1 parent 975f0a4 commit 165daa4

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)