R6034 | Runtime Error | ..attempt to load C runtime library

Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

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 6 years and 10 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.
Locked
User avatar
GHIsolierung
Posts: 62
Last visit: Tue Nov 02, 2021 12:46 am

R6034 | Runtime Error | ..attempt to load C runtime library

Post by GHIsolierung »

# Powershell Studio 2017, v 5.4.140 @ Windows 10 x64bit

Hello Team,

after successfully working with Micrsoft SQL Compact Files to store Settings within my GUI Project,
I decided to deinstall SQL Compact 4.0 from my Computer, because I dont need it anymore -
I simply reference to the dlls and its working, on my pc and on others.
The needed dlls are in my staging Folder, that are deployed later.

I still can Build my app to an exe File, but I cannot create an msi file since then.

The Message from Powershell Studio in the embedded Output Section is:
>> MSI 'D:\OneDrive\GH\Powershell\Aktuell\07 Projekte\RoboSync\V32 - Exclusions\Robosync\RoboSync V1.psproj'
SAPIEN Package and Deploy Tool 4.1 (c) 2005 - 2017 SAPIEN Technologies, Inc.

Processing input files...
Error: No output from Heat

heat.exe : error HEAT0001 : Der Zugriff auf den Pfad "C:\Users\MyUsername\Powershell\Aktuell\07 Projekte\RoboSync\V32 - Exclusions\Robosync\bin\msi" wurde verweigert.



Exception Type: System.UnauthorizedAccessException



Stack Trace:

   bei System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

   bei System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost)

   bei System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost)

   bei System.IO.Directory.CreateDirectory(String path)

   bei WixToolset.Tools.Heat.Run(String[] args)



>> Completed
In addition there´s a window that pops up at the same time:
Runtime Error!
Program: C:\Program Files\SAPIEN Technologies...

R6034
An Application has made an attempt to load the C runtime library incorrectly.
Please contact the applications´s support team for more information.
The Problem is only related to this project, others working well, msi too.

* reinstalled SQL Compact 4.0 on my PC
* reinstalled Powershell Studio
* Access to the output path is given, I didnt change anything, but checked twice.
* The project itself works perfectly, event with the SQL Compact Files, Databases etc.

Certainly I can upload the hole code if you want to.

Thanks for any help in advance.
Greetings
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: R6034 | Runtime Error | ..attempt to load C runtime library

Post by jvierra »

The extra DLLs need to be added to the project in the installer phase. You cannot load them in the project folder or they may be added incorrectly.

DLLs can be targeted to a specific folder. In your case the should be in the folder with the EXE.
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 20
Been upvoted: 37 times

Re: R6034 | Runtime Error | ..attempt to load C runtime library

Post by Alexander Riedel »

The WiX toolkit will load dlls if they are COM objects to extract registration information.
As such, COM objects distributed with an installer must be able to be instantiated on the build machine.
Alexander Riedel
SAPIEN Technologies, Inc.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: R6034 | Runtime Error | ..attempt to load C runtime library

Post by jvierra »

The C runtime must be present for anything to work. You need to be sure that Net 3.5 SP1 is installed.

In the "Microsoft SQL Server Compact Edition" folder under "Programs Files" contains a readme (ReadmeSSCE_ENU.htm) describing the requirements and limitations of SqlCE.
This topic is 6 years and 10 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.
Locked