Csharp app only work on my pc Visual Studio 2019 - c#

If I run the App on my pc from visual studio or from outside of VS, after compiling with the installer package and installing it, in my pc works ok but if I install it on other pc, then I get this error and don't start
"Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately
Could not load file or assembly "filename.dll" or one of its dependencies. The specified module could not be found."
Note: "filename.dll" is located in to the main folder with app.exe file after installation
Error From Windows Event Viewer
Application: myapp.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.ComponentModel.Win32Exception at System.Windows.Forms.NativeWindow.CreateHandle(System.Windows.Forms.CreateParams) at System.Windows.Forms.Control.CreateHandle() at System.Windows.Forms.Form.CreateHandle() at System.Windows.Forms.Control.get_Handle() at myapp.Form1+KeyHandler..ctor(System.Windows.Forms.Keys, System.Windows.Forms.Form) at myapp.Form1..ctor() at myapp.Program.Main()
any ideas about that?

I found the solution, some dll files are missing that this one uses, I know which ones are used with the dumpbin /imports filename.dll command, so I downloaded all those and it worked

Related

How to fix 'Framework resource extraction failed. Exception of type 'System.OutOfMemoryException' was thrown' error in UWP?

I have a Project of a UWP application. When I try to build the project on my laptop, it gives me this error message:
C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.uwpcoreruntimesdk\2.2.8\tools\CoreRuntime\Microsoft.Net.CoreRuntime.targets(195,9): error : Framework resource extraction failed. Exception of type 'System.OutOfMemoryException' was thrown.
I tried to build the project on multiple computers and strangely on my home computer it can successfully build the project, on my other two computer it can't. It's true that on my laptop there is not too much RAM (~1.5-2Gb free before building), but on my other two computer it's the same amount, and just one computer can build it.

Winforms CL20R3 with CefSharp Project

I have a similar problem to this question C# windows appication Event: CLR20r3 on application start
The error is like this:
Application: MantenedorPlanesMain.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.FileNotFoundException
Battery:
in CefSharp.Example.CefExample.Init ()
in CefSharp.WinForms.Example.Program.Main ()
But only on some machines, for example, on my computer I can use the program without any problem and in a computer of my office too.
I tried to find the source of the problem here in stackoverflow and realized that the error was caused by a cs file not found, but is within the project.
When I go to see CefSharp.WinForms.Example.Program.cs and comment the line of CefSharp.Example.CefExample.Init() throws me the same error in another file.
I tried everything, even the CopyLocal = true and x86, but still not working. I think there may be a problem with the system language, which is the only common factor of the machines that worked, Spanish language system.
any ideas?
In this context FileNotFoundException usually means you need to install VC++ or that you compiled in Debug mode (You need to build in Release mode when running on a machine without VS installed)
https://github.com/cefsharp/CefSharp/blob/master/NuGet/Readme.txt#L18
Also See the Note within https://github.com/cefsharp/CefSharp/wiki/Frequently-asked-questions#6-how-do-i-include-the-visual-studio-c-2012-redistributables-on-the-target-app

BindingFailure on assembly PresentationFramework.Aero2

My WPF application, named Odyssey, throws an exception while starting, more specific: when creating a new window.
Additional Information: The assembly with display name 'PresentationFramework.Aero2' failed >to load in the 'Load' binding context of the AppDomain with ID 1. The cause of the failure >was: System.IO.FileNotFoundException: Could not load file or assembly >'PresentationFramework.Aero2, Version=4.0.0.0, Culture=neutral, >PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file >specified.
The strange thing is that when I run the application with the "Enable the Visual Studio hosting process" unchecked - this exception is thrown. When running it while the "Enable the Visual Studio hosting process" is checked - it works like expected since it loads 'PresentationFramework.Aero'.
Since the application is trying to load the 'PresentationFramework.Aero2', the application itself fails with not showing any images.
I tried to create a new solution and then it worked, but only if I have a different name on the solution! I backed up Odyssey and then deleted it, removed .Net 4.5 and Visual Studio 2012. I re-installed .Net 4.5 and Visual Studio 2012, but when I create a new solution named Odyssey, it still tries to load 'PresentationFramework.Aero2', but not for the other solutions I have made.
Anybody now a fix for this?
I managed to solve this myself. I ended up with deleting all the references to Odyssey in the windows registry in pure frustration and it ended up working!
After move application from one PC to another, I also got error message: Additional Information: The assembly with display name 'PresentationUI.Aero2' failed to load in the 'Load' binding context of the AppDomain with ID 1.
I resolve this problem by deleting .suo file and it works.

"Unable to find an entry point named 'sqlite3_open_v2' in DLL 'sqlite3'.":""

I am working on a windows forms application. when I run the application on windows 8 (VS2012), the application runs upto an extent and then crashes, giving the exception "{"Unable to load DLL 'sqlite3': The specified module could not be found. (Exception from HRESULT: 0x8007007E)"}".
I downloaded the 32 bit SQLite3 and added it to my solution. thereafter I got the error
{"Unable to find an entry point named 'sqlite3_open_v2' in DLL
'sqlite3'.":""}.
I am running my application in the release mode.
kindly help me fix this issue!!
Is your application running as x86 or x64? You may want to check your build configuration.

BCL.XPRB dll isn't initializing in C#.Net application

I am trying to resolve an initialization error for the optimizer library. I have a license for and installed Xpress-IVE 64bit studio, however, I need to link and use xprb facilities in a C#.Net application that is built in VS2010 and runs on IIS.
I copied xprb.dll and xprbdn.dll to application bin folder for deployment, and added them as references. Yet when the application calls XPRB.init(), it throws exception
Unable to load DLL 'xprb.dll': The specified module could not be found.
(Exception from HRESULT: 0x8007007E)
Any suggestions on what could be missing?
It turned out to be a Windows/.Net/general instability issue. The license, although installed, wasn't found by .Net, which decided to blow up as if the dll wasn't available. Finally was resolved mysteriously after a few system reboots and updates.
I had the same issue, but running windows 8.1, xpress-ive 64bit and vs2013 with c#. I could run IVE and solve problems from there, but i got "An unhandled exception of type 'Additional information: Unable to load DLL 'xprb.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)" error in runtime when running using bcl in VS. What solved the problem in my case was going through the necessary environment variables and directing them to the correct xpress folders (environment variables xpress, path and mosel.dso).

Categories