Updating ini-parser

I know the nuget runs fine with the .netfull dependency init-parser 2.5.2 (my project is targetting .net6), but there's various forks out there, some even with published packages on nuget.org that do multi-targetting. Why not use one of them?

Hi @ssteiner

The present SDK supports multi targets with support to .netstandard2.0.
While I see ini-parser has limited support wrt frameworks it can target to , did you see any compatibility issue with platform-sdk, with .net6
We can add a new feature request to use a different library for parsing ini like ini-parser-netstandard, but interested to know about any existing compatibility problems or restrictions you are facing because of it.

Thanks
Hemanth

no it works fine with .net6 (and .net7) on windows. However, we may end up running the solution in a linux docker environment - that's what I'm a bit concerned about. We've been using other libs that throw these warnings at restore for years on net5/6/7 without problems, but never on any other architecture.
I'm not sure how .net reacts when it's running on another platform.. if it just doesn't work if you call a method that would require the .net4.x dependency, if it would crash, etc.

I threw mine in one via Jenkins for you;

Started by user Rios, Eos
Running as SYSTEM
Building remotely on jenkinsndodc19-prod (Unix Docker-compose Docker-enabled) in workspace /app/jenkins/workspace/Mass_Markets_Business_Intelligence/Scratch/Scratch
[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
[WS-CLEANUP] Done
[Scratch] $ /bin/sh -xe /app/jenkins/tmp/jenkins6007785419694272541.sh

  • wget http://pa-cdn.corp.intranet/PureCloudClient.zip
    --2023-10-04 20:52:16-- http://pa-cdn.corp.intranet/PureCloudClient.zip
    Connecting to pa-cdn.corp.intranet (pa-cdn.corp.intranet)|redacted|:80... connected.
    Length: 69071 (67K) [application/x-zip-compressed]
    Saving to: ‘PureCloudClient.zip’

  • unzip PureCloudClient.zip
    Archive: PureCloudClient.zip
    creating: PureCloudClient/

    Determining projects to restore...
    :warning:/app/jenkins/workspace/Mass_Markets_Business_Intelligence/Scratch/Scratch/PureCloudClient/PureCloudClient.csproj : warning NU1701: Package 'ini-parser 2.5.2' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework 'net6.0'. This package may not be fully compatible with your project.
    :warning:/app/jenkins/workspace/Mass_Markets_Business_Intelligence/Scratch/Scratch/PureCloudClient/PureCloudClient.csproj : warning NU1701: Package 'WebSocketSharp 1.0.3-rc11' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework 'net6.0'. This package may not be fully compatible with your project.
    Restored /app/jenkins/workspace/Mass_Markets_Business_Intelligence/Scratch/Scratch/PureCloudClient/PureCloudClient.csproj (in 1.75 sec).
    :warning:/app/jenkins/workspace/Mass_Markets_Business_Intelligence/Scratch/Scratch/PureCloudClient/PureCloudClient.csproj : warning NU1701: Package 'ini-parser 2.5.2' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework 'net6.0'. This package may not be fully compatible with your project.
    :warning:/app/jenkins/workspace/Mass_Markets_Business_Intelligence/Scratch/Scratch/PureCloudClient/PureCloudClient.csproj : warning NU1701: Package 'WebSocketSharp 1.0.3-rc11' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework 'net6.0'. This package may not be fully compatible with your project.
    :warning:/app/jenkins/workspace/Mass_Markets_Business_Intelligence/Scratch/Scratch/PureCloudClient/Client.cs(500,7): warning SYSLIB0021: 'MD5CryptoServiceProvider' is obsolete: 'Derived cryptographic types are obsolete. Use the Create method on the base type instead.' [/app/jenkins/workspace/Mass_Markets_Business_Intelligence/Scratch/Scratch/PureCloudClient/PureCloudClient.csproj]
    PureCloudClient -> /app/jenkins/workspace/Mass_Markets_Business_Intelligence/Scratch/Scratch/PureCloudClient/bin/Debug/net6.0/PureCloudClient.dll

Build succeeded.

17 Warning(s)
0 Error(s)

Time Elapsed 00:00:05.92
Finished: SUCCESS

  • PureCloudClient/bin/Debug/net6.0/PureCloudClient /checklake
    2023-10-04 21:04:26 Access token = REDACTED BUT SUCCESSFUL

Data Lake currently available through 10/4/2023 4:15:33 AM +00:00, expecting 10/3/2023 10:05:00 PM +00:00

Builds fine. Runs fine. Assumption is as long as you don't run something that uses that code it be a problem.

Okay.. but seeing the warnings about WebSocketSharp.. what if you subscribe for notifications (notifications using Websockets and all)?

You would potentially have a problem there, but you don't have to use the native listener, you can add in a 3rd party of your own choosing and use it. A socket listener is a socket listener, nothing special about theirs.

1 Like

I can confirm that the choice of WebSocketSharp is unimportant; I'm the one who made that choice a long time ago. :slight_smile: It was an off-the-shelf solution for WebSockets that worked at the time; it doesn't do anything unique. Feel free to copy the source code for the NotificationHandler classes into your own app and use whatever libraries you like.

If either of you have a suggestion for a better package to use that has better support, please do share it. We (most of Genesys R&D) aren't .NET developers by trade, so it's helpful to hear from the community that uses it day-to-day.

I always knew you were the problem.

But in this case you get off free;

Building remotely on jenkinsndodc17-prod (Unix DOCKER Docker-compose Docker-enabled) in workspace /app/jenkins/workspace/Mass_Markets_Business_Intelligence/Scratch/Scratch2
Determining projects to restore...
:warning:/app/jenkins/workspace/Mass_Markets_Business_Intelligence/Scratch/Scratch2/PureCloudSocketListener/PureCloudSocketListener.csproj : warning NU1701: Package 'ini-parser 2.5.2' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework 'net6.0'. This package may not be fully compatible with your project.
:warning:/app/jenkins/workspace/Mass_Markets_Business_Intelligence/Scratch/Scratch2/PureCloudSocketListener/PureCloudSocketListener.csproj : warning NU1701: Package 'WebSocketSharp 1.0.3-rc11' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework 'net6.0'. This package may not be fully compatible with your project.
Restored /app/jenkins/workspace/Mass_Markets_Business_Intelligence/Scratch/Scratch2/PureCloudSocketListener/PureCloudSocketListener.csproj (in 445 ms).
:warning:/app/jenkins/workspace/Mass_Markets_Business_Intelligence/Scratch/Scratch2/PureCloudSocketListener/PureCloudSocketListener.csproj : warning NU1701: Package 'ini-parser 2.5.2' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework 'net6.0'. This package may not be fully compatible with your project.
:warning:/app/jenkins/workspace/Mass_Markets_Business_Intelligence/Scratch/Scratch2/PureCloudSocketListener/PureCloudSocketListener.csproj : warning NU1701: Package 'WebSocketSharp 1.0.3-rc11' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework 'net6.0'. This package may not be fully compatible with your project.
PureCloudSocketListener -> /app/jenkins/workspace/Mass_Markets_Business_Intelligence/Scratch/Scratch2/PureCloudSocketListener/bin/Release/net6.0/PureCloudSocketListener.dll

Build succeeded.
[/app/jenkins/workspace/Mass_Markets_Business_Intelligence/Scratch/Scratch2/PureCloudSocketListener/PureCloudSocketListener.csproj]
5 Warning(s)
0 Error(s)

Time Elapsed 00:00:03.30

  • PureCloudSocketListener/bin/Release/net6.0/PureCloudSocketListener
    info: Microsoft.Hosting.Lifetime[0]
    Application started. Press Ctrl+C to shut down.
    info: Microsoft.Hosting.Lifetime[0]
    Hosting environment: Production
    info: Microsoft.Hosting.Lifetime[0]
    Content root path: /app/jenkins/workspace/Mass_Markets_Business_Intelligence/Scratch/Scratch2

warn: PureCloudSocketListener.Listener[0]
2023-10-04 23:32:52 channel.metadata WebSocket Heartbeat

info: Microsoft.Hosting.Lifetime[0]
Application is shutting down...
[ATLASSIAN CLOUD PLUGIN] [WARN] Not a WorkflowRun, onCompleted() won't be propagated to listeners
Finished: SUCCESS

Set a listener to subscribe to a queue and exit the first response it got (which was heartbeat in this case) but apparently the targeting is fine though utilizing the native System.Net.WebSockets directly may be prudent longer term.

story of my life lol

Nice! I'm pretty sure we were on .NET Framework 4.0 when the feature was first added. It looks like the native support wasn't added till 4.5. I'll make sure this gets on the list for consideration. The team that owns the SDKs now is going to be taking a pass at each of them to modernize them (e.g. currently working on a new native TypeScript web-first JS SDK).

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.