Can't run Xilium. CefGlue built on Visual Studio 2012 - winforms

'Hi all, I downloaded Xilium.CefGlue and built the source on Visual Studio (xilium-xilium.cefglue-b22787699e57), I also downloaded cef_binary_3.1453.1236_windows_xilium and copied the libcef.dll to the Xilium Winforms demo as the apps requires it to run but when I run it I get the following error:
An attempt was made to load a program with an incorrect format.
Exception from HRESULT: 0x8007000B
I've targeted x86, can I get some help?
Thanks

Ok, here's the steps I used to get the samples working in VS 2012:
Get the code from Xilium.CefGlue on github. (The one I used was c3d674a3a8)
Open the Xilium.CefGlue solution in VS2012
Remove or don't build the CefGlue.Demo.GtkSharp project (it didn't interest me & I didn't have the needed libraries)
In the Configuration Manager, select Active Solution Platform to be x86
Ensure that the target framework settings cooperate between projects. (e.g. CefGlue.Demo & CefGlue.Demo.WinForms by default are v2.0, but they depend on CefGlue which is v4.5) (For simplicity I set them all to v4.0 Client profile and it worked.)
Build solution — should succeed
Copy Xilium files from the unzipped cef_binary_3.1453.1236_windows_xilium to the output folder (bin\x86\Debug or bin\x86\Release). Minimum requirement seems to be:
libcef.dll and icudt.dll from .\Debug or .\Release
cef.pak and the locales\ folder from .out\Debug or .\Resources
Set CefGlue.Client as the StartUp Project
Run it

Related

Publish WPF + EF Core App with Windows Installer Project

I have tried to create an .exe file to my WPF App and SQL Server related databse with EF Core using Windows Setup Installer Project.
I included all the dll's files from /bin/Release and built it for any CPU.
The Setup Project has been created successfully and it worked on my PC as I expected.
Otherwise when I try to install the Setup File on another PC, I can't even open it up and see what's wrong.
I guess the problem comes from the database but I can't find anything helpful on the internet.
So you get the application installed, run it and nothing happens, right? Here is what you do:
Run it. Watch nothing happen
Hit the Windows key and type "Event"
When "Event Viewer" appears in the list of applications, run it
In Event Viewer, go to Windows Logs >> Application
Near the top there will probably be an error entry. It will probably be related to your application. And if you were missing a key file needed to run your application, like a DLL, the name of the file will probably be in there in the details section
Go back to your installer and add that missing file. Or if that file is part of some support package (like, say, MS Redistributable for Visual C++) then add the installer for that too.

running Winform Application

detailed message box texti made a winform application on my pc and it runs fine. but when I tried to run it on another PC by copying the exe file and other dll files there , the application failed to run and all of a sudden it shows a dialog box to close the aplication.
please refer to screenshot of error.
enter image description here
Like bassfader said: One possible explanation is that your application is handling files during startup. In that case: integrate more extensive exception handling for those parts. Potentially with logging, to locate the problem
In my experience this however is more often a case of missing some kind of dependency.
Double check .NET runtimes. Lookup the target .net version in Visual Studio and run the installer on the target machine.
Investigate if your app uses any assemblies that are not part of the .NET framework. Sometimes these are not copied to the bin directory if they are in the GAC (ensure the flag "Copy Local" is set to "Always" in Visual Studio)
Ensure you have copied the whole bin folder
Check compiler output to see if you've got Platform mismatches. IIRC this can sometimes work fine on a dev machine but cause problems when Visual Studio is missing or you get to a different OS.

What is needed to run a WPF app?

I copied my .exe, plus its vshost.exe, plus the sqlite database file it uses, but it won't run outside of Visual Studio. There's no err msg when I 2-click my .exe - it just won't run. What is it lacking?
If you're on your local box, you would need:
The main application.exe (NOT vshost.exe - These are for Visual Studio debugging only.)
application.exe.config if there are any settings associated with the app.
Any DLLs the application references. Since you're using SQLite, you likely have a dependency on some SQLite library.
If you're deploying to another computer, then you should also consider the following:
Is the .NET Framework you're targeting installed on the target computer?
You should also build in "Release" instead of "Debug", since debug DLLs may be missing.
Generally, the following files are NOT necessary:
.pdb files
Any vshost files

Create Software Distribution Packages From Visual Studio

I would like to setup an automatic software distribution process, preferably from Microsoft Visual Studio, which builds my projects in all the different configurations and platforms, and packages all the created objects in a predefined folder tree structure.
The software distribution packages would be for Windows libraries and WDM driver projects written in C/C++. Each library has several different configurations (i.e. Windows 7 Release, Windows XP Release, MT/MD runtime compilation flags) for different platforms (i.e. x86 and x64). A similar thing is with the drivers. Without any automatic process to create a software distribution package, it's necessary to build all the different configurations for each platform and then copy the created objects to a predefined folder structure and then zip the created folder giving it a release name and version. This process is quite time consuming and error prone. Therefore, my goal is to automate this process using a clean a nice solution.
I've been researching about this for a few weeks already and have actually implemented a few different solutions. However non of the solutions I implemented until now is flawless whatsoever. Hence since this should be a problem that I guess many developers have already encountered, I would like to hear different opinions on what would be a nice and efficient way to do it.
Up until now I've tried the following:
A batch script and a Makefile to be used by NMAKE. This is not so good because it makes difficult to set the same build parameters that are set on the visual studio project.
Implemented a "deploy" target task (editing the .vcsproj files) which calls MSBuild of the project for each configuration/platform and copies the generated files to a distribution directory. This has the advantage that I can start the deploy activity from within visual studio but it also produces several environment variables problems, specially when building windows drivers.
Any ideas or suggested solutions will be appreciated.
Thanks in advance.
Zion
If you haven't already, add a post-build step for each lib and driver which copies the built files into your specific tree and also zips them.
If you haven't already, create one Visual Studio solution (.sln file) which builds all these projects at once.
If you haven't already, set up Build configuration using the Build | Configuration Manager dialog. Now from the IDE, you should be able to specify a specific configuration and do a Build | Rebuild Solution and make sure all the projects are successfully built.
From the command-line, you can now automate #3 by opening a Visual Studio command line prompt (which sets up the environment variables appropriately). Start devenv.exe with appropriate command-line parameters.

How to Resolve Quickbooks Interface Error: QBFC Error "Could Not Load File or Assembly Interop.QBFC7 or one of its dependencies"

I recently inherited a C# Winforms application that communicates with Quickbooks via their QBFC interface. The application contains a reference to the COM Server Interop.QBFC7.dll. The application works fine in our test environment and in several of our client's environments. Although, yesterday when I attempted to install it on a new customer's system I continued to get the following error:
Could Not Load File or Assembly 'Interop.QBFC, Version=8.0.0.87, Culture=neutral, PublicKeyToken=...' or one of its dependencies. The system cannot find the file specified.
I know that we have several customers running this application on various versions of Quickbooks (i.e. Quickbooks Pro, Premier and Enterprise between 2008 and Enterprise 11.0). To my knowledge, this is the first customer that we have attempted to deploy this application that has Enterprise 12.0.
I have attempted the following to resolve the issue with no success:
1) Install the QBFC7_Installer from the Intuit Developer Network Site
2) Install the Quickbooks SDK 10 Installer from the Intuit Developer Network Site
3) Verified that the Interop.QBFC7.dll file is present on the file system.
4) Attempted to manually register the COM object Interop.QBFC7.dll via the command prompt: regsvr32 Interop.QBFC7.dll (This fails as well and windows returns an error stating that it cannot find the object).
Does anyone have any suggestions or feedback about additional things that I can try to resolve this issue? I get the same error on 3 different machines at their site running different operating systems (i.e. Windows Server 2008, Windows 7, and Windows Vista)? I have also tried compiling in both x86 and 64-bit configurations to no avail.
Thanks in advance for any help.
First of all, you should be targeting an x86 build only. The QuickBooks SDK won't work if you target Any CPU or x64. Your main problem, though, is that you are looking for the wrong version of QBFC. Notice the version stamp on your error message:
Could Not Load File or Assembly 'Interop.QBFC, Version=8.0.0.87,
Culture=neutral, PublicKeyToken=...' or one of its dependencies. The
system cannot find the file specified
This is QBFC8, not QBFC7. So you should be able to fix the problem with the QBFC8 installer.
The version of QuickBooks should not make a difference, since QBFC 8 (or 7, for that matter) will work with the 2008 and Enterprise 11 or 12.
You should look into using a setup project to install your application in order to avoid this problem in the future. A setup project should detect the QBFC dependency automatically. Once you see this happening, go to SearchPath property of your setup project and add the MergeModule directory from the SDK that is installed on your machine. Once you do this, you should see that the QBFC and Xerces merge modules are added to your project automatically as dependencies. Of course, you'll also need to update your code to a more recent version of QBFC, but that's probably a good idea in any case.

Resources