StrataFrame Forum

Problem Distributing SF App

http://forum.strataframe.net/Topic32753.aspx

By William Fields - 12/3/2014

Hello,

I've customized the SampleDataInstallerClass solution and now need to build a Setup.exe for distribution.

I've created an InstallShield basic MSI project and have included the following:

SQLSMOMergeModule.msm (not sure what files are included and where they end up)

In the [CommonFiles]\MicroFour\StrataFrame\ folder I'm including these files:

MicroFour StrataFrame Base.dll

MicroFour StrataFrame Business.dll

MicroFour StrataFrame DBEngine.dll

MicroFour StrataFrame UI.dll

[update] I mistakenly listed the inherited UI DLL instead of the base UI

When I install these via the compiled Setup.exe, the files end up on the target workstation, but the SampleDataInstallerClass EXE does not run. When I launch it, I see the EXE in task manager for a second or two, then it goes away.

What I'm missing?

Thanks.

Bill
By Larry Caylor - 12/3/2014

It looks like you're missing MicroFour Strataframe UI.dll, Inherited UI.dll is the DevExpress control wrapper. For testing I'd first install the application on the target workstation using the file copy method to make sure I have everything required to run the application. Once everything was working I'd go back and create an MSI.

-Larry
By Edhy Rijo - 12/3/2014

Hi William,

Also, besides Larry's comment, I always install all my assemblies in the same folder as the application instead of using the GAC or any other common folders, etc.

Having all assemblies in the same folder as the application will allow you to test as suggested by Larry.  Also it is good to have a clean virtual machine to do your setup test.
By William Fields - 12/3/2014

My mistake, the MicroFour StrataFrame UI.dll is actually what's being installed.
By William Fields - 12/3/2014

This Setup.exe doesn't have an "application" folder, it's just being used to install the SF DLL's and SMO's needed to run the SampleDataInstallerClass EXE on the workstation.

The application EXE will be run from a network location.
By William Fields - 12/3/2014

One more thing, the application EXE does run on a workstation with the SF development environment.
By Edhy Rijo - 12/3/2014

Hi William,

I build the SampleDataInstallerClass into my application's main assembly (.exe), and I don't run anything from a network patch since some .NET programs may need custom security settings to be able to run from a network path.

I install my application locally in each workstation and my logic is that any workstation can update the database structure from the main application which I control access to it via the RBS.
By William Fields - 12/3/2014

When I copy the application EXE to the local desktop, I'm getting the same results, the process shows up in task manager for a few seconds, then goes away.
By Larry Caylor - 12/3/2014

Try copying the SF dlls to the same directory location where you have your exe files on a local non-development system.

-Larry
By Edhy Rijo - 12/3/2014

This is part of the code to run my version of this class, in my case DataProgress.vb

Dim
 DDTPackageName As String = "InsuranceBrokerSystemDDT.pkg"
Dim DDTPackagePassword As String = "MyPassword"
Dim loDataUpdateProgress As New DataProgress(MicroFour.StrataFrame.Data.DataLayer.DataSources("").ConnectionString(), DDTPackageName, DDTPackagePassword, DataDeploymentOptions)
loDataUpdateProgress.TopMost = True
UpdateDatabase = loDataUpdateProgress.ShowDialog()
loDataUpdateProgress.Close()
loDataUpdateProgress.Dispose()

Please post the code you are using show the form?
By William Fields - 12/3/2014

> Try copying the SF dlls to the same directory

Bingo, that did it.

Is there anyway to make the DLL's visible to the EXE regardless? Is there a project reference/setting that can be added to the EXE that will tell it to find the DLL's in a particular local folder?

Thanks!
By Edhy Rijo - 12/3/2014

Hi William,

You have to understand how dot net will look for the assemblies when loading, you can search the MSDN for more complete answer, but basically, your .EXE will do this:
  1. Look for required assemblies in the same folder as the .EXE
  2. If not found, then it will look in the GAC.
Using GAC has some tricky issues based on the version of the assemblies, so I have been using my .EXE folder instead and never had issues when releasing updates to my applications.

Glad it is working for you now.
By William Fields - 12/3/2014

You're right Edhy.

I'm still straddling the world of VFP/.NET.... Our VFP application just underwent a SQL database backend replacement and this SF app is being used to maintain/update the SQL database. So, I'm still pretty green as far as .NET application runtime knowledge.

Thanks for your help.

Bill