1. Eric Verhorstert
  2. PowerBuilder
  3. Tuesday, 2 July 2024 13:57 PM UTC

On a Windows 2019 server LoadWithDotNet returns -1. On several Windows 11 desktops it works just fine.

We had to install  .NET on the server because it was not installed. Should we install other dll's to get this up and running? It is a Powerbuilder classic 32 bits application.

dotnet --info on the server returns

Host:
Version: 8.0.6
Architecture: x64
Commit: 3b8b000a0e
RID: win-x64

.NET SDKs installed:
No SDKs were found.

.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.31 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.31 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.31 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
Not set

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download

 

Thanks,

Eric

Accepted Answer
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 2 July 2024 14:58 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi Eric;

  For the DLL that you are trying to load .. is it built using the .NET framework or .Net Core framework?

Regards .. Chris

Comment
  1. Eric Verhorstert
  2. Tuesday, 2 July 2024 15:55 PM UTC
Hello Chris,



.Net Core Framework.



Regards .. Eric
  1. Helpful
  1. Chris Pollach @Appeon
  2. Tuesday, 2 July 2024 17:19 PM UTC
Hmmm .. then the "LoadWithDotNet" command *should* have worked assuming that the correct framework version was installed.

Have you tried using the older "LoadWithDotNetCore" command instead?
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Wednesday, 3 July 2024 06:27 AM UTC
  2. PowerBuilder
  3. # 1

if this:

dotnet --info on the server returns

Host:
Version: 8.0.6
Architecture: x64

and you pb application is 32 bit, that seems to indicate to me you have to install 32 bit dotnet.

 

Comment
  1. Eric Verhorstert
  2. Wednesday, 3 July 2024 06:45 AM UTC
dotnet -- info returned Other architectures found:

x86 [C:\Program Files (x86)\dotnet]

registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]



Thats why i thought the dotnet x86 was installed.



After installation of .NET desktop Runtime 6.0 x86 it works fine
  1. Helpful
  1. Eric Verhorstert
  2. Wednesday, 3 July 2024 06:45 AM UTC
dotnet -- info returned Other architectures found:

x86 [C:\Program Files (x86)\dotnet]

registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]



Thats why i thought the dotnet x86 was installed.



After installation of .NET desktop Runtime 6.0 x86 it works fine
  1. Helpful 1
There are no comments made yet.
Peter Pang @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 3 July 2024 04:51 AM UTC
  2. PowerBuilder
  3. # 2

Hi Eric,

 

I didn’t reproduce this problem locally.

I use version PB2022 R3 3356, installed .NET Desktop Runtime 6.0.26 (x86) on Windows Server 2019, and the dll file is .NET Core 3.1. Loading dll using LoadWithDotNet works normally;

  1. Which version of PB runtime do you use? Please check the pbdotnetinvoker.runtimeconfig.json file in the runtime directory and see if the tfm item is net6.0?
  2. Check whether .NET Desktop Runtime 6.0 (x64)is installed and please install .NET Desktop Runtime 6.0(x86).

 

 

Best Regards,

Peter

Comment
  1. Eric Verhorstert
  2. Wednesday, 3 July 2024 06:45 AM UTC
dotnet -- info returned Other architectures found:

x86 [C:\Program Files (x86)\dotnet]

registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]



Thats why i thought the dotnet x86 was installed.



After installation of .NET desktop Runtime 6.0 x86 it works fine
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.