Skip to content

Commit

Permalink
Updated example to .Net 8 and updated dependencies
Browse files Browse the repository at this point in the history
WE2-888

Signed-off-by: Mihkel Kivisild mihkel.kivisild@cgi.com
  • Loading branch information
Mihkel Kivisild authored and mrts committed Jun 21, 2024
1 parent d788cbd commit b3de3d0
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/dotnet-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup dotnet
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x # SDK Version to use.
dotnet-version: 8.0.x # SDK Version to use.

- name: Cache Nuget packages
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.nuget/packages
# Look to see if there is a cache hit for the corresponding requirements file
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Set up the `libdigidocpp` library as follows:

1. Install the _libdigidocpp-3.17.1.msi_ package or higher. The installation packages are available from [https://github.com/open-eid/libdigidocpp/releases](https://github.com/open-eid/libdigidocpp/releases).
2. Copy the C# source files from the `libdigidocpp` installation folder `include\digidocpp_csharp` to the `src\WebEid.AspNetCore.Example\DigiDoc` folder.
3. Copy all files from either the `x64` subfolder of the `libdigidocpp` installation folder to the example application build output folder `bin\...\net60` (after building, see next step). When building custom applications, choose `x64` if your application is 64-bit and `x86` if it is 32-bit.
3. Copy all files from either the `x64` subfolder of the `libdigidocpp` installation folder to the example application build output folder `bin\...\net8.0` (after building, see next step). When building custom applications, choose `x64` if your application is 64-bit and `x86` if it is 32-bit.
4. When running in the `Development` profile, create an empty file named `EE_T.xml` for TSL cache as described in the [_Using test TSL lists_](https://github.com/open-eid/libdigidocpp/wiki/Using-test-TSL-lists#preconditions) section of the `libdigidocpp` wiki.

#### For Ubuntu Linux
Expand Down Expand Up @@ -79,7 +79,7 @@ Set up the `libdigidocpp` library as follows:

1. Install the _libdigidocpp-3.17.1.pkg_ package or higher. The installation packages are available from [https://github.com/open-eid/libdigidocpp/releases](https://github.com/open-eid/libdigidocpp/releases).
2. Copy the C# source files from `/Library/libdigidocpp/include/digidocpp_csharp` directory to `src/WebEid.AspNetCore.Example/DigiDoc` directory.
3. Go to `src/WebEid.AspNetCore.Example/bin/.../net60` directory and create symbolic link to `/Library/libdigidocpp/lib/libdigidoc_csharp.dylib` library:
3. Go to `src/WebEid.AspNetCore.Example/bin/.../net8.0` directory and create symbolic link to `/Library/libdigidocpp/lib/libdigidoc_csharp.dylib` library:
```cmd
ln -s /Library/libdigidocpp/lib/libdigidoc_csharp.dylib
```
Expand Down
2 changes: 1 addition & 1 deletion src/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@
LICENSE
README.md

!WebEid.AspNetCore.Example/bin/Release/net6.0/publish/
!WebEid.AspNetCore.Example/bin/Release/net8.0/publish/
6 changes: 3 additions & 3 deletions src/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# We're using .NET 6 now, but when we migrate to .NET 8 in the future, we should use chiseled images.
FROM mcr.microsoft.com/dotnet/aspnet:6.0-jammy
# In the future, we should use chiseled images.
FROM mcr.microsoft.com/dotnet/aspnet:8.0-jammy

WORKDIR /app

Expand All @@ -13,7 +13,7 @@ RUN echo "deb [signed-by=/usr/share/keyrings/ria-repository.gpg] https://install
apt-get clean && \
rm -rf /var/lib/apt/lists

COPY ./WebEid.AspNetCore.Example/bin/Release/net6.0/publish/ .
COPY ./WebEid.AspNetCore.Example/bin/Release/net8.0/publish/ .

ENV ASPNETCORE_ENVIRONMENT=Production

Expand Down
18 changes: 9 additions & 9 deletions src/WebEid.AspNetCore.Example/WebEid.AspNetCore.Example.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<UserSecretsId>aspnet-web_eid_asp_dotnet_example-3FF31439-FDC0-4164-B154-03E005FE96CD</UserSecretsId>
<RootNamespace>WebEid.AspNetCore.Example</RootNamespace>
<CopyRefAssembliesToPublishDirectory>false</CopyRefAssembliesToPublishDirectory>
Expand All @@ -11,14 +11,14 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="6.0.4" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.4" NoWarn="NU1605" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="6.0.4" NoWarn="NU1605" />
<PackageReference Include="Microsoft.Identity.Web" Version="1.24.0" />
<PackageReference Include="Microsoft.Identity.Web.UI" Version="1.24.0" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.15.1" />
<PackageReference Include="System.Runtime.Caching" Version="6.0.0" />
<PackageReference Include="System.Text.Json" Version="6.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="8.0.6" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.6" NoWarn="NU1605" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="8.0.6" NoWarn="NU1605" />
<PackageReference Include="Microsoft.Identity.Web" Version="2.19.1" />
<PackageReference Include="Microsoft.Identity.Web.UI" Version="2.19.1" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.20.1" />
<PackageReference Include="System.Runtime.Caching" Version="8.0.0" />
<PackageReference Include="System.Text.Json" Version="8.0.3" />
<PackageReference Include="WebEid.Security" Version="1.1.0" />
</ItemGroup>

Expand Down

0 comments on commit b3de3d0

Please sign in to comment.