Skip to content

Commit

Permalink
update nugets and target framework
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman Ettlinger committed Feb 23, 2024
1 parent 86b4c05 commit a7e2c87
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 33 deletions.
6 changes: 3 additions & 3 deletions GDSwithREST.Domain/GDSwithREST.Domain.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Gds.Server.Common" Version="1.4.372.106" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Gds.Server.Common" Version="1.5.373.121" />
</ItemGroup>

</Project>
17 changes: 8 additions & 9 deletions GDSwithREST.Domain/Services/GdsService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
using Opc.Ua.Configuration;
using Opc.Ua.Gds.Server;
using Opc.Ua.Gds.Server.Database;
using Opc.Ua.Gds.Server.Database.Linq;
using static Org.BouncyCastle.Math.EC.ECCurve;
using Opc.Ua.Server.UserDatabase;

namespace GDSwithREST.Domain.Services
{
Expand Down Expand Up @@ -39,7 +38,7 @@ public async Task StartServer(CancellationToken stoppingToken)
ConfigSectionName = "Opc.Ua.GlobalDiscoveryServer"
};
// load the application configuration.
await _applicationInstance.LoadApplicationConfiguration("/OPC Foundation/GDS/config/Opc.Ua.GlobalDiscoveryServer.Config.xml", false);
await _applicationInstance.LoadApplicationConfiguration("GdsConfig\\Opc.Ua.GlobalDiscoveryServer.Config.xml", false);
// check the application certificate.
await _applicationInstance.CheckApplicationInstanceCertificate(false, 0);

Expand All @@ -49,7 +48,7 @@ public async Task StartServer(CancellationToken stoppingToken)
// get the DatabaseStorePath configuration parameter.
GlobalDiscoveryServerConfiguration gdsConfiguration = _applicationInstance.ApplicationConfiguration.ParseExtension<GlobalDiscoveryServerConfiguration>();
string usersDatabaseStorePath = Utils.ReplaceSpecialFolderNames(gdsConfiguration.UsersDatabaseStorePath);
var usersDatabase = JsonUsersDatabase.Load(usersDatabaseStorePath);
var usersDatabase = JsonUserDatabase.Load(usersDatabaseStorePath);
//await _certificateGroup.Init();
var gdsServer = new GlobalDiscoverySampleServer(
_applications,
Expand All @@ -61,12 +60,12 @@ public async Task StartServer(CancellationToken stoppingToken)
//start GDS
await _applicationInstance.Start(gdsServer);

//trust GDS CA
var defaultCertificateGroup = _certificateGroups.CertificateGroups.SingleOrDefault(cg => cg.Id.Identifier is (uint)CertificateGroupType.DefaultApplicationGroup);
if (defaultCertificateGroup is null)
throw new Exception("Failed to initialze GDS CA Certifcate");
////trust GDS CA
//var defaultCertificateGroup = _certificateGroups.CertificateGroups.SingleOrDefault(cg => cg.Id.Identifier is (uint)CertificateGroupType.DefaultApplicationGroup);
//if (defaultCertificateGroup is null)
// throw new Exception("Failed to initialze GDS CA Certifcate");

await _applicationInstance.AddOwnCertificateToTrustedStoreAsync(defaultCertificateGroup.Certificate, stoppingToken);
//await _applicationInstance.AddOwnCertificateToTrustedStoreAsync(defaultCertificateGroup.Certificate, stoppingToken);

var endpoints = _applicationInstance.Server.GetEndpoints().Select(e => e.EndpointUrl).Distinct();

Expand Down
14 changes: 7 additions & 7 deletions GDSwithREST.Infrastructure/GDSwithREST.Infrastructure.csproj
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.14">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions GDSwithREST/GDSwithREST.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UserSecretsId>6914888c-64ea-485e-88e3-f8da36bfff21</UserSecretsId>
Expand All @@ -28,8 +28,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.5" />
<PackageReference Include="NSwag.AspNetCore" Version="13.20.0" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.6" />
<PackageReference Include="NSwag.AspNetCore" Version="14.0.3" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion GDSwithREST/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
app.UseOpenApi();

//GET: /swagger
app.UseSwaggerUi3();
app.UseSwaggerUi();

//Map Endpoints
app.MapControllers();
Expand Down
10 changes: 5 additions & 5 deletions GDSwithRest.IntegrationTests/GDSwithRest.IntegrationTests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

Expand All @@ -10,16 +10,16 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />

<PackageReference Include="Ductus.FluentDocker" Version="2.10.59" />

<PackageReference Include="xunit" Version="2.6.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.4">
<PackageReference Include="xunit" Version="2.7.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.0">
<PackageReference Include="coverlet.collector" Version="6.0.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
10 changes: 5 additions & 5 deletions GDSwithRest.Tests/GDSwithRest.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

Expand All @@ -11,13 +11,13 @@


<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.6.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.4">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="xunit" Version="2.7.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.0">
<PackageReference Include="coverlet.collector" Version="6.0.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down

0 comments on commit a7e2c87

Please sign in to comment.