Helping Developers Master PowerBuilder Classic and .NET

Yakov Werde

Subscribe to Yakov Werde: eMailAlertsEmail Alerts
Get Yakov Werde: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn

Blog Post

Migrating Classic Apps That Call Custom DLLs

A tip and trick that can save you time

One difference when migrating Classic Apps between the WinForm/WebForm and WPF is how you need to handle listing referenced DLLs during the migration process.  In .NET the deployer copies referenced Non System (those not part of Windows) DLLs into the OUT folder together with the executable and other references.  The .NET project object must have a listing of required DLLs.  In Win/Web Form migration, the migration wizard has a page on which you list Referenced DLLS.  The wizard actually scans your code and lists any Non System DLLs it finds referenced in external function calls for you.  When the scan is done you have the chance to manually add any DLLs the wizard missed (such as web service DataWindow DLLs or .NET Web Service DLLs) For apps making a lot of external function calls to custom DLLs this wizard can be time saver in the migration process.

The WPF Migration Wizard however, even though WPF applications have the same DLL deployment requirement, does not contain a page on which you can list DLLs.  It is the migrating developer's responsibility to go into the project object after migration and manually list the DLLs to deploy.  I'm going to wager that a significant number of first time migrators will forget to list their DLLs and spend time trying to find out what went wrong with their app deploy.

A workaround remedy for the DLL listing problem was proposed by Evan Rothfield of Sybase.  What Evan suggests is that you create a WinForm target in Classic first from your Classic Win32 app.  The net result of the migration is simply a new Classic Target file and a generated .NET project object added to a PBL of your choice.  There is no need to compile the .NET project; you're just using it for the generated project object.  This project object will have all the custom external DLLs listed as described above.  Then in the .NET IDE migrate the WinForm project instead of the classic project.  Be sure to check the ‘Copy settings from an existing project as show below'.  After migration open up the WPF project object.  You will see that your Referenced DLLs were copied and are listed


WPF Wizard

Here's an example is tried using the ws_winform sample app that installs with PowerBuilder 12 Classic.  This is the view listing referenced DLLs from the Classic project object.

WinForm Project Object

This is the view after migration to WPF .NET

WPF Project Object

Happy PowerBuilding!

More Stories By Yakov Werde

Yakov Werde, a 25 year IT industry veteran, is a member of TeamSybase and the newly formed Sybase Customer Evangelist Team. Yakov is a recognized author, speaker and trainer who has been designing and delivering PowerBuilder, .NET, EaServer, Web App Development, and Java training for over 14 years to corporate, military and government developers. Prior to discovering his aptitude as an educator, Yakov worked as an architect, project manager and application coder in the trenches of application software development. Yakov holds a Masters in Education with a specialty in instructional design for online learning from Capella University and a BS in math and computer science from Florida International University. Yakov, managing partner of eLearnIT LLC (, authors and delivers workshops and web based eLearning tutorials to guide professional developers toward PowerBuilder Classic and .NET mastery. Follow Yakov on Twitter as @eLearnPB