Skip to content

Commit

Permalink
Update nugets (#401)
Browse files Browse the repository at this point in the history
* Update opc sdk

* Update nugets

* Add base and remove unused

* Revert Microsoft.Extensions.Logging and OpenTelemetry, tests failing
  • Loading branch information
luiscantero authored Nov 20, 2024
1 parent 19b79e0 commit c2eb853
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
8 changes: 4 additions & 4 deletions src/opc-plc.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.9.0" />
<PackageReference Include="Serilog.Extensions.Logging.File" Version="3.0.0" />
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<PackageReference Update="Nerdbank.GitVersioning" Version="3.6.143" />
<PackageReference Update="Nerdbank.GitVersioning" Version="3.6.146" />
</ItemGroup>

<!-- When referencing a local build of the OPC UA stack for testing, define the constant UseLocalOpcUaSdk in the file Directory.Build.targets -->
<Choose>
<When Condition="'$(Configuration)'=='Debug'">
<ItemGroup Condition="!$(DefineConstants.Contains(UseLocalOpcUaSdk))">
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Configuration.Debug" Version="[1.5.374.124]" NoWarn="NU5104" />
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Server.Debug" Version="[1.5.374.124]" NoWarn="NU5104" />
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Configuration.Debug" Version="[1.5.374.126]" NoWarn="NU5104" />
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Server.Debug" Version="[1.5.374.126]" NoWarn="NU5104" />
</ItemGroup>
<ItemGroup Condition="$(DefineConstants.Contains(UseLocalOpcUaSdk))">
<ProjectReference Include="..\..\UA-.NETStandard\Libraries\Opc.Ua.Configuration\Opc.Ua.Configuration.csproj" />
Expand All @@ -53,7 +53,7 @@
</When>
<When Condition="'$(Configuration)'=='Release'">
<ItemGroup Condition="!$(DefineConstants.Contains(UseLocalOpcUaSdk))">
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Configuration" Version="[1.5.374.124]" NoWarn="NU5104" />
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Configuration" Version="[1.5.374.126]" NoWarn="NU5104" />
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Server" Version="[1.5.374.124]" NoWarn="NU5104" />
</ItemGroup>
<ItemGroup Condition="$(DefineConstants.Contains(UseLocalOpcUaSdk))">
Expand Down
4 changes: 1 addition & 3 deletions tests/MetricsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace OpcPlc.Tests;
/// Tests for Metrics.
/// </summary>
[NonParallelizable]
internal class MetricsTests
internal class MetricsTests : SimulatorTestsBase
{
private readonly MeterListener _meterListener;
private readonly Dictionary<string, object> _metrics;
Expand Down Expand Up @@ -83,8 +83,6 @@ public void TestAddMonitoredItemCount()
[Test]
public void TestAddPublishedCount()
{
var sessionId = Guid.NewGuid().ToString();
var subscriptionId = Guid.NewGuid().ToString();
MetricsHelper.AddPublishedCount(1, 0);
_metrics.TryGetValue("opc_plc_published_count_with_type", out var counter).Should().BeTrue();
counter.Should().Be(1);
Expand Down
12 changes: 6 additions & 6 deletions tests/opc-plc-tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@
<Choose>
<When Condition="'$(Configuration)'=='Release'">
<ItemGroup>
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Server" Version="[1.5.374.124]" NoWarn="NU5104" />
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Configuration" Version="[1.5.374.124]" NoWarn="NU5104" />
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Client.ComplexTypes" Version="[1.5.374.124]" NoWarn="NU5104" />
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Server" Version="[1.5.374.126]" NoWarn="NU5104" />
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Configuration" Version="[1.5.374.126]" NoWarn="NU5104" />
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Client.ComplexTypes" Version="[1.5.374.126]" NoWarn="NU5104" />
</ItemGroup>
</When>
<Otherwise>
<ItemGroup>
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Server.Debug" Version="[1.5.374.124]" NoWarn="NU5104" />
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Configuration.Debug" Version="[1.5.374.124]" NoWarn="NU5104" />
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Client.ComplexTypes.Debug" Version="[1.5.374.124]" NoWarn="NU5104" />
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Server.Debug" Version="[1.5.374.126]" NoWarn="NU5104" />
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Configuration.Debug" Version="[1.5.374.126]" NoWarn="NU5104" />
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Client.ComplexTypes.Debug" Version="[1.5.374.126]" NoWarn="NU5104" />
</ItemGroup>
</Otherwise>
</Choose>
Expand Down

0 comments on commit c2eb853

Please sign in to comment.