Main Assemblies not loading on start-up - EXE not executing

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 10 years and 6 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
genecox
Posts: 5
Last visit: Fri Nov 13, 2015 8:08 am

Main Assemblies not loading on start-up - EXE not executing

Post by genecox »

The generated EXE is not working on any target machines. I've traced this back to the my source project file

Output (source) screen shows a number of assemblies not loading from their original source locations:

MainForm.pff: API restriction: The assembly 'file:///C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.dll' has already loaded from a different location. It cannot be loaded from a new location within the same appdomain.
MainForm.pff: API restriction: The assembly 'file:///C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Windows.Forms.dll' has already loaded from a different location. It cannot be loaded from a new location within the same appdomain.
MainForm.pff: API restriction: The assembly 'file:///C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Drawing.dll' has already loaded from a different location. It cannot be loaded from a new location within the same appdomain.
MainForm.pff: API restriction: The assembly 'file:///C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.XML.dll' has already loaded from a different location. It cannot be loaded from a new location within the same appdomain.
MainForm.pff: API restriction: The assembly 'file:///C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.DirectoryServices.dll' has already loaded from a different location. It cannot be loaded from a new location within the same appdomain.

Do I need to correct the file's assemblies?
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Main Assemblies not loading on start-up - EXE not execut

Post by davidc »

This error should not affect the script or the file. It just means an equivalent version was already loaded. Let us know if this message persists after the next service release.

David
David
SAPIEN Technologies, Inc.
User avatar
genecox
Posts: 5
Last visit: Fri Nov 13, 2015 8:08 am

Re: Main Assemblies not loading on start-up - EXE not execut

Post by genecox »

Thanks for the reply ---is there a SAPIEN dependency list (the build components) for the EXE under - generated?

I'm trying to migrate the EXE to target machine, without success. I have tried to ensure the correct OS , Azure, and correct Powershell modules:

Name Value
---- -----
PSVersion 3.0
WSManStackVersion 3.0
SerializationVersion 1.1.0.1
CLRVersion 4.0.30319.18052
BuildVersion 6.2.9200.16398
PSCompatibleVersions {1.0, 2.0, 3.0}
PSRemotingProtocolVersion 2.2

ProductVersion FileVersion FileName
-------------- ----------- --------
C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Azure.psd1
5.2.0.51212 5.2.0.51212 C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.Data.Edm.dll
5.2.0.51212 5.2.0.51212 C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.Data.OData.dll
5.2.0.51212 5.2.0.51212 C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.Data.Services.Client.dll
1.8.0.0 1.8.0.0 C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.Configuration.dll
C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.Management.CloudService.format.ps1xml
1.0.0.0 1.0.0.0 C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.Management.ConsoleAppUtils.dll
C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.Management.ConsoleAppUtils.pdb
0.6.18 0.6.18 C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.Management.dll
C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.Management.dll-Help.xml
C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.Management.pdb
0.6.18 0.6.18 C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.Management.Service.dll
C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.Management.Service.pdb
C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.Management.ServiceBus.format.ps1xml
0.6.18 0.6.18 C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.Management.ServiceManagement.dll
C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.Management.ServiceManagement.dll-Help.xml
C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.Management.ServiceManagement.pdb
0.6.18 0.6.18 C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.Management.SqlDatabase.dll
C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.Management.SqlDatabase.dll-Help.xml
C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.Management.SqlDatabase.pdb
C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.Management.SqlDatabase.Types.ps1xml
0.6.18 0.6.18 C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.Management.Storage.dll
C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.Management.Storage.dll-Help.xml
C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.Management.Storage.format.ps1xml
C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.Management.Storage.pdb
C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.Management.Store.format.ps1xml
1.0.0.0 1.0.0.0 C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.Management.Sync.dll
C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.Management.Sync.pdb
0.6.18 0.6.18 C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.Management.Test.Utilities.dll
C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.Management.Test.Utilities.pdb
1.0.0.0 1.0.0.0 C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.Management.Tools.Vhd.dll
C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.Management.Tools.Vhd.pdb
0.6.18 0.6.18 C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.Management.Utilities.dll
C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.Management.Utilities.pdb
C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.Management.WebSites.format.ps1xml
C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.Management.WebSites.Types.ps1xml
33.0.6196.601... 33.0.6196.601 C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.ServiceManagement.Client.dll
1.0.8698.12 (... 1.0.8698.12 C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.Storage.DataMovement.dll
2.0.5.1 2.0.5.1 C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Microsoft.WindowsAzure.Storage.dll
4.5.11.15520 4.5.11.15520 C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Newtonsoft.Json.dll
C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\startup.ps1
1.0.0.0 1.0.0.0 C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\System.Net.Http.dll
4.0.20710.0 4.0.20710.0 C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\System.Net.Http.Formatting.dll
1.0.0.0 1.0.0.0 C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\System.Net.Http.WebRequest.dll
5.2.0.51212 5.2.0.51212 C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\System.Spatial.dll
C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\welcome.txt
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Main Assemblies not loading on start-up - EXE not execut

Post by davidc »

Make sure you are running the correct Bit-ness( 64 bit vs 32bit).
What settings are you using when you are packaging the script to an exe?
Also make sure you don't have any dependencies on a local profile.

Note the exe dependencies depend on the settings used. It always requires PowerShell and the corresponding .NET version. Any modules you use must also be present on the target machine.

David
David
SAPIEN Technologies, Inc.
This topic is 10 years and 6 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.