1. Joseph Vendra
  2. PowerBuilder
  3. Sunday, 5 March 2023 21:53 PM UTC

Is there a way to make sure PowerBuilder PowerClient deployment checks if dot net 6 or higher is already installed on machine or not?

Is there any deployment options for including a dot net install or is that all up to us?

IE: Dot net 6 core

Joseph,

 

Joseph Vendra Accepted Answer Pending Moderation
  1. Tuesday, 7 March 2023 07:26 AM UTC
  2. PowerBuilder
  3. # 1

@Chris, Yes, was aware of that and have been using that for other items just was trying to avoid the big hit,

Armeen Mazda @Appeon and Miguel Leeuwe ; The self contained option did work in that it created a published version with a 58mb footprint.

Seems like I have lots of new options so thanks for all the suggestions folks,

Correct me if I am wrong but from what I could determine I had to edit the .pubxml settings file directly to set the <SelfContained>True</SelfContained> but then appears that it did 'publish' it in a self-contained fashion.  Is that the correct way to enable that option?

Still seemed like too much 'plumbing' was included so I tried throwing in the <PublishTrimmed>true</PublishTrimmed> into the .pubxml settings file.

https://learn.microsoft.com/en-us/dotnet/core/deploying/trimming/trim-self-contained

But that really didnt seem to work at all, Either SnapDevelop is not picking that up or it was but wasnt performing the trimming or there wasnt anything else to trim?  

Following up more information on your snapDevelop 2021 publishing documentation I could not determine where any log files from the publishing process were sent to, any ideas?

https://docs.appeon.com/snapdevelop2021/Publish/index.html

Jury is out if the self-published version actually works, illl post a update later if it worked out and deploys without the big .net sdk install or not ..
Another option is to refactor the code into an ActiveX which I am sure would downsize it into a mini footprint, but thats a different can of beans. 

Thanks for all your help,  And yeah, I never sleep ;)

Joseph

Comment
There are no comments made yet.
Joseph Vendra Accepted Answer Pending Moderation
  1. Monday, 6 March 2023 15:06 PM UTC
  2. PowerBuilder
  3. # 2

I will look at this and see what if I can do a lean trim side by side install and see if that works.

I am trying to deliver a small c# dll from SnapDevelop that seems like overkill to deploy it,

Perhaps I should look at just using C++ and be done with it, I know the VC++ redist is very small compared to the 208mb bloatware .net is trying to make me push out.

For context, this is my PB Code snippet, and the C# dll is nothing more than a small SQL server locator dll nothing too complicated at all, finds all the SQL servers available to the server if the SQL Browser Services are on and pulls the list of catalogs from them based on the uid/pwd per server. Nothing fancy at all, but needing to deliver it with a TRUCK seems like overkill.

PowerBuilder Code Snippet:

DotNetAssembly lnv_assembly
lnv_assembly = Create DotNetAssembly
ll_status = lnv_assembly.LoadWithDotNetCore(This.is_AssemblyPath)

Joseph,

Comment
  1. Armeen Mazda @Appeon
  2. Monday, 6 March 2023 17:03 PM UTC
If you are developing the .NET DLL yourself with .NET 6, you can chose to compile it in SnapDevelop as self-contained. If compiled as self-contained, the .NET 6 libraries will be inside the .DLL so there is no .NET 6 you need to have pre-installed.
  1. Helpful 1
  1. Miguel Leeuwe
  2. Monday, 6 March 2023 18:36 PM UTC
What we do, is use .Net framework 4.5.2 instead of .Net Core or 6, for our DLLs. This way we don't check / install anything, assuming that

Powerbuilder needs to have some .Net framework installed anyway. It allows our code to also run on older windows versions (including older win server). Some of our customers still have windows 2008 servers and windows 7 clients.

For a table of supported versions of .Net framework on windows, see:

https://learn.microsoft.com/en-us/dotnet/framework/get-started/system-requirements

regards.
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Monday, 6 March 2023 03:39 AM UTC
  2. PowerBuilder
  3. # 3

Hi,

See https://learn.microsoft.com/en-us/dotnet/core/deploying/deploy-with-cli 

You can create a "self-contained-deployment". This will give you all the files you need. You can then include those files as external files.

regards.

Comment
  1. Armeen Mazda @Appeon
  2. Monday, 6 March 2023 17:05 PM UTC
Miguel exactly right, since you are creating the .NET 6 project yourself there is no need for the hassles and frailty of such environment dependencies.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 6 March 2023 02:15 AM UTC
  2. PowerBuilder
  3. # 4

Hi Joseph;

   There is a "Preload" event in the PC project. With that, you can fire up an external job (ie: .bat file) that checks for the .Net framework version that your expecting. If not found, it could run the .Net runtime install. After that, control would continue on with the PC App startup. Food for thought. HTH

Regards .... Chris 

Comment
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Monday, 6 March 2023 01:25 AM UTC
  2. PowerBuilder
  3. # 5

It’s all up to you to install anything extra your app needs.  PowerClient takes care of PB runtime files, your app EXE and PBDs, and whatever you put in external files tab.  There is also a preload event in project object you can use to execute batch script.

Comment
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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.