Unable to load DLL 'mozglue': Error in Geckofx 45.0.1 - vb.net

i am trying to setup a windows application which embeds Geckofx Web Browser. version 45.0.1
I have successfully embedded browser in windows form but when i run application an expection is thrown saying
Unable to load DLL 'mozglue':
Location targeted in xpcom.initialize contains mozglue.dll file. But still there is an error.
Any solution to this ?? how to fix this issue?

I believe this is caused by missing DLLs that are required to load mozglue.
Check whether the Firefox folder was copied to the output folder and contains these three files: D3DCompiler_43.dll, msvcp120.dll, and msvcr120.dll.
If not, a vcredist that matches your architecture/build target might be required on some machines.
On this related issue on GeckoFX's bitbucket tracker is also mentioned to check whether the file omni.ja is in the Firefox folder after deployment.
You need to get omni.ja there for mozglue.dll to run!
Furthermore, it may also be required to specify the location of the Firefox folder manually before initializing:
System.IO.Directory.SetCurrentDirectory(System.IO.Path.GetDirectoryName(Reflection.Assembly.GetExecutingAssembly.Location))
Xpcom.Initialize("Firefox")

in my case installing Visual C++ Redistributable for Visual Studio 2015 fix the problem.
my case: run program on VPS Unable to load DLL 'mozglue'...
my program is 32bit and written with VS 2015, So i just download and install 32bit version of C++ 2015.

Installed below redistributable to make it all work.

Related

My DLL causes a "Caution you are attempting to open a file of type "Applicaiont Extension" .dll at boot

On a Windows 7 x64 I have have written an application which also includes a .dll which is installed to the GAC. This has been working without error for about 3 years. I recently made a new version of my Application but did not change the version of the .dll. The application starts at boot time and now I get a message from Windows...
Caution ... You are attempting to open a file of type "Application Extension" .dll
And then it wants you to choose a program to run it with.
I uninstalled this version and installed my previous version and I do not get the error.
I have no idea where the problem is so my tags are an attempt to get the ball rolling. Wix is my installer program which might have something to do with it.
How is my Application started at boot time
There is a registry entry in \Software\Microsoft\Windows\CurrentVersion\Run which has a path to the Application's .exe file. This Applicaion has the dll as a reference.
So if you remove it from autostart and start it after the pc is fully up, does the same message appear ? If that worked, a workaround would be registering your app as a service and set its startup to delayed.
When i googled your error some malware- threads came up. If you straight up load your dll and its unsigned e.g. via rundll32.exe that might cause an issue - but i dont entirely know how your autostart-entrypoint looks like.

ccrpDtp.ocx error while running vb6 project in windows 7

I got the following error while running the vb6 project in windows 7. I was search in google. I can't find the exact solution. Please help me to fix this issues.
The component CCrpDtp.ocx or one of its dependencies not correctly registered.a file is missing or invalid
The most obvious thing is to check to see if you have the ccrpdtp.ocx file installed and registered on your machine.
If you do not, go to the Common Controls Replacement Project site and download ccrpdtp6.zip.
The file contains the control and a dll dependency, both of which need to be installed somewhere on your machine. There's also a readme file which explains that you have to use regsvr32 to register the ocx.

Setting up NSASS in production environment?

we are using NSASS to compile our Sass files to css ( https://github.com/TBAPI-0KA/NSass ). NSASS is set up and working great in development environment. But when we try to deploy it to our testserver we are unable to get NSASS up and running.
We keep getting
Exception information:
Exception type: FileNotFoundException
Exception message: Could not load file or assembly 'NSass.Wrapper.x64.dll' or one of its dependencies. The specified module could not be found.
at NSass.SassCompiler..ctor()
at NSass.SassHandler..ctor()
The problem is that NSASS uses some dynamic way to load these dlls, that does not seem to work. The dll is located in \bin\NSass.Wrapper but fuslogvw is logging that it only tries to search the bin directory. The dynamic way of loading this dll is made so that it loads the x86 or x64 depending on the OS if I understand correctly.
For the bin loading code of NSASS: https://github.com/TBAPI-0KA/NSass/blob/master/NSass.Core/AssemblyResolver.cs
I have tried moving the dll files (both X64 and x86) to bin folder but I get the same error looking in event viewer even if the fuslogvw says that all is ok.
Anyone have any tips on what I can do as a next step to try and solve this?
Edit:
Tried logging AppDomain.CurrentDomain.SetupInformation.PrivateBinPath and it points to the bin folder as it should and AppDomain.CurrentDomain.BaseDirectory points to the correct folder aswell. Not sure if anything change the CurrentDomain from Application_Start where I log until the Assembly Load of the NSASS files.
Also worth noting. This is an EPiServer web so not sure if EPiServer changes anything. But if so shouln't it be problems in the Dev environment as well?
I finally found the issue!
After using DependencyWalker to analyze the dlls of NSASS I found that the server did not have the correct version of C++ Redistriburable.
So after installing that all works fine!
Hope this helps other people with the same issue.
We had the same issue but the fix ended up being two things.
Installing Visual C++ Redistributable Packages for Visual Studio 2013 onto our servers.
can be downloaded here
Changing our compiler to libsass-net using nuget, it seems very similar to NSass (github).

Deploying Winforms Application to Client Machines Application Failing on start

This is Edited from the OP. This is a VB .NET 4.0 WinForms application. There is a mysql datasource involved with this project. The target CPU is set to any. Problem: When running this application on any computer that has VS 2010 installed along with the mysql connector it runs flawlessly. When installing on a virgin system(ie. No developer environment installed) but that machine does have .net framework 4.0 installed and a mysql server without the connector installed the application falls immediately. So to fix the issue I install the mysql connector MSI. This immediately fixes the issue on the client system and it runs. The problems is that as you can see below from my Installer setup that the 2 needed DLL files for MYSQL are actually included in the installation package so should not need to be installed separately. So Why is it that using that installer from the images do I need to install the mysql connector? Any Ideas? Below is a screen shot of the References the program uses and from what I believe I do not need to deploy any of those DLL files with my application other than the 2 MYSQL DLL files. So why is this failing?? Below are images showing the project references as well as the Installer Files that are being installed in the applicaiton folder. As shown in the image the 2 mysql dll files are to be put in the application folder. There is also a screen shot showing each dll's properties for in application folder.
You answered your own question.
but that machine does have .net framework 4.0 installed and a mysql server without the connector installed the application falls immediately.
You don't need to install the connector msi package, but you do need to include the two DLL files in the application's directory. Anytime you have some dependency, you need to deploy it with your application.
Edit solution quoted from my comment:
From your update it sounds like you have a version mismatch on the
assemblies, and the references are set to Specific Version = True.
Check the version number of the assemblies on your developer machine
in the output directory, and check the version you are installing on
the client system. (You can just hover over the DLL to read the
version on the ToolTip). You can try to set Specific Version to false
by right clicking your reference and selecting properties, or simply
ensure you deploy the same version of assemblies. Your program is
looking for the versions its compiled against

Trouble registering ChilkatDotNet4.dll to the GAC

I'm trying to add a .NET 4.0 .dll to the GAC. I am attempting to do this because it is published by a 3rd party company as both a 32 and 64bit .dll which I must use from different apps on different platforms in both formats.
At any rate, I am having trouble registering this dll to the GAC on a Windows Server 2008 environment.
I have tried copying gacutil.exe (and supporting file) found at "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools" on my local machine to the "C:\Windows\Microsoft.NET\Framework\v4.0.30319" folder on the target production server per the suggestions found here.
I then tried copying them to "C:\Windows\Microsoft.NET\Framework64\v4.0.30319".
Running from both locations indicated successful installation. And indeed, the registration appears successful:
C:\Windows\Microsoft.NET\assembly\GAC_64\ChilkatDotNet4\v4.0_9.0.8.0__eb5fc1fc52ef09bd\ChilkatDotNet4.dll
C:\Windows\Microsoft.NET\assembly\GAC_32\ChilkatDotNet4\v4.0_9.0.8.0__eb5fc1fc52ef09bd\ChilkatDotNet4.dll
However, running a console app that refers to the (64bit) version of the dll errors out with the following message:
System.IO.FileNotFoundException: Could
not load file or assembly
'ChilkatDotNet4.dll' or one of its
dependencies. The specified module
could not be found. File name:
'ChilkatDotNet4.dll'
So, I have now manually created the following GAC entries using mkdir and copy from a command prompt (which may or may not actually work. I have no clue what is so special about gacutil.exe):
C:\Windows\Microsoft.NET\assembly\GAC_MSIL\ChilkatDotNet4\v4.0_9.0.8.0__eb5fc1fc52ef09bd\ChilkatDotNet4.dll (using the 64bit version of the dll)
C:\Windows\assembly\GAC_64\ChilkatDotNet4\v4.0_9.0.8.0__eb5fc1fc52ef09bd\ChilkatDotNet4.dll
C:\Windows\assembly\GAC_32\ChilkatDotNet4\v4.0_9.0.8.0__eb5fc1fc52ef09bd\ChilkatDotNet4.dll
After each "install" of the dll, I tested and received the same error. Any ideas welcome!
EDIT: the GAC issue above may not actually be the culprit. Turns out, even when I create a brand new Console App project and add the .dll directly (so that it lives in the bin), I still can't run it on the sever. Also, I've noted that Console apps are created targeting the .NET 4.0 Client Profile rather than the .NET Framework 4. When I try to run it targeting the client profile, it appears that none of the System.Web* libraries are available. However, I tried running a very simple test app targeting both and neither would run on the server while referencing the bad .dll.
Is there a special kind of install that was to occur to run .NET 4.0 Console Apps?
For anyone else who may have trouble with this in the future. It was not a generalized problem with the way I was registering the dll to the GAC or how I was referring to it from my projects.
ChilkatDotNet4.dll (and the other versions I'm sure) was built in Visual C++. So, the server it is being deployed to has to have the Visual C++ Runtime installed for the appropriate processor architecture.
For 2010 (.NET 4.0):
x86
x64
If you're running an x86 app on a 64-bit platform. Make sure to mark the application pool with "Enable 32-bit applications" = true.