So we're trying to deploy Chromium with an application. We're including all of the required files to the client machines but noticed that the application fails unless Skype is installed. Installing Skype fixes the problem. Is there any way I can tell what changes Skype is making other than installing it's core application?
The error that's thrown sans-Skype is:
System.IO.FileNotFoundException: Could not load file or assembly 'CefSharp.Core.dll' or one of its dependencies. The specified module could not be found.
File name: 'CefSharp.Core.dll'
at CefSharp.WinForms.ChromiumWebBrowser..ctor(String address)
at EncompassToChrome.ChromeControl..ctor(String URL)
at fb7f2542af19424d4f995c0e6750158283.__fb7f2542af19424d4f995c0e6750158283_Form1_Load(Object Sender, EventArgs EventArgs)
at EllieMae.Encompass.Forms.Form.OnLoad(EventArgs e)
at EllieMae.Encompass.Forms.Form.InvokeLoad()
at EllieMae.EMLite.InputEngine.InputHandlerBase.executeLoadEvent()
without going to deep:
The error message says: CefSharp.Core.dll is missing.
Have a look for this file.
For detailed debugging you can use SysInternals 'Process Monitor'.
This tool can log all file access during the installation or tried file access when run the application.
Got it figured out. A combo of Mr Makielski's recommendation to use SysInternals 'Process Monitor' and HugoRune's to use dependencywalker was the answer for me.
Used Process Monitor to find the files created when skype installs and cross referenced those against the unmanaged dependency list dependencywalker gave me. turned out to be: msvcp120.dll and msvcr120.dll that I needed.
Related
Me and my friend are working on a project in c# ASP.NET and we are using git as version control. I am working on macOS and my friend is working on Windows. It have worked fine until one day ago when we had worked on my friend's computer and pushed the code. Later i tried to make a pull request and when i tried to run the code (that works fine on the Windows computer) i recieve this error message:
/Users/ludvig/.nuget/packages/ikvm.image/8.4.4/buildTransitive/IKVM.Image.targets(9,9): Error MSB4175: The task factory "RoslynCodeTaskFactory" could not be loaded from the assembly "/usr/local/share/dotnet/sdk/7.0.101/Microsoft.Build.Tasks.Core.dll". Could not load file or assembly 'System.CodeDom, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. Could not find or load a specific file. (0x80131621) (MSB4175) (Monsterarenan)
We are using .net 6 and the IDE is Visual Studio. This is probably a poorly asked question but we both are new to ASP.NET and we did not find anyone with a similar problem.
There are many reasons for this error, here are three solutions, please try one by one:
The operation could not be completed successfully because the file contains a virus or potentially unwanted software. Please turn off all protections.
It may be a problem of path access rights. Please go to the folder where you are located and change the permission of your user name to user ownership in Properties-Security.
Open web.config and find the following related nodes.
Comment out these results and recompile.
(First things first, I'm kind of new on this type of programming)
I'm trying to make a windows form application where i request data from a PLC so it can be stored in a access database. This application is going to be running on a different computer.
On the solution i created and besides my project I'm using an existing project that works "like" the communication between the app and the PLC, it is called LibplctagWrapper (on my main project I create a reference to this last one)
(https://www.mesta-automation.com/how-to-communicate-to-an-allen-bradley-plc-with-c-and-libplctag-ethernet-ip-library/),
and it works on my PC, but every time y copy the Bin folder to the new computer, then run the app, it opens, but a warning popup messages appears. Saying: Unable to load DLL "plctag.dll": The specified module could not be found. (Exception from HRESULT: 0x8007007E).
The LibplctagWrapper is in another directory than my Solution and Main Project so I moved it to C: so the direction will be the same on the new computer. But it doesn't work.(copy the LibplctagWrapper in C: of the new pc as well)
Moved the entire solution/main project to C: as well... the same result.
Instead of just the bin folder i copied the entire project folder... im thinking the problem goes with the fact that the LibplctagWrapper is not in the same direction? but I don't know how to place it in the same direction... I search on visual studio but I never saw the option to move it.
Unable to load DLL "plctag.dll": The specified module could not be found. (Exception from HRESULT: 0x8007007E).
This error message is quite generic, missing dependencies can cause it as well as the mentioned module not being present at all. Check the Dependency Walker ( http://www.dependencywalker.com/) to discover required C++ runtimes or something alike. Remember to take x86/x64 into consideration.
#JavierMata - I think you have probably resolved this issue, but for others encountering something similar you can use the recently released official wrappers which can be downloaded via nuget. Github link: https://github.com/libplctag/libplctag.NET
The libplctag.NativeImport package handles loading the appropriate C runtime so you don't have to.
I have developed an C# application that run very well in local.
But there is a problem when i put on the server.
The application uses a DLL library in his references (A.dll) and in a point of the execution the A.dll creates in the Temp directory another DLL (embedded in it, let's call it B.dll).
But when the A.dll try to load the B.dll an exception is threw:
system.invalidoperationexception: failed to load B.dll
I have not access at the DLLs source, are libraries.
So recap:
The process have the full control permission on the file and path.
(cheked)
Is running like Administrator. (checked)
In my application if I try to open the dll in binary mode, the
operations have no problems.
Runs well on every OS that i have tested (Windows 8_64 / XP_32 /
2008_32 / 7_64), but fails with 2008 R2 64.
I have tried to ReDownload, rename, reinstall the B.DLL, i have putted the program in the same path of the B.DLL, etc etc, with no results.
So at this point I think that is a security problem on the server, like "Processes cannot load DLLs" or something similar.
The exception:
http://i.imgur.com/NmB2Fth.png?1
Anyone can suggest me any solution? Would i check better? Where?
P.S
IF i try to register the dll i got the same error of this:
Register DLL file on Windows Server 2008 R2
The solution was simple.
I have used a very useful tool named Event Viewer (Start->Execute->eventvwr.exe)
When i started my application a new error event was showed on the Windows Logs->Applications:
Activation context generation failed for "C:\Temp\APP\myfile.dll".
Dependent Assembly Microsoft.VC90.CRT,processorArchitecture="x86",
publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8" could not be found.
Please use sxstrace.exe for detailed diagnosis.
A quick search and the result was that the server needed the Visual C++ Runtime for x86 (x86 because my application works in the 32bit application pool)
Once installed this package: http://www.microsoft.com/en-us/download/details.aspx?id=5582
Everything worked like a charm.
I hope this will help anyone to save some time!!
Why does my app compiled with C# not work on other computers?
I have the .Net Framework 4.0 already installed.
When I open my .exe on another computer, I get the error:
ERROR SIGNATURE:
Event Type: clr20r3
P1: myapp.exe
P2: 1.0.0.0
P3: 502051f
P4: myapp
P5: 1.0.0.0
P6: 502051f
P7: 2
P8: 6
P9: System.IO.FileNotFoundException
A system.io.filenotfoundexception usually means your program tried to open a file that wasn't there. It is likely that your program is trying to access some file using a path or filename that doesn't exist or is in a different location on other computers. Without knowing what myapp.exe is supposed to do, I can't answer any further.
Your solution is probably to re-write your app so that it handles that exception better in some way, such as by checking for the file's existence before trying to open it.
It sounds to me like a case of missing references. Check your references from the solution explorer or go into bin/debug or bin/release (depending on your configuration) and make sure to copy all the dlls or exes that your project depends on
Most likely the app is trying to load an assembly and is failing to find it
A little off topic but ideally with any application you want to add some 'unhandled' exception handling to write to a log file or the event log so that you can capture more of the exception stack.
Often you only get the last exception message and you also don't see the call stack
You can roll up exceptions quite easily using something like this:
string RollupException(Exception ex)
{
StringBuilder sb = new StringBuilder();
sb.Append(ex.Message);
while(ex.InnerException != null)
{
sb.Append(Environment.Newline);
sb.Append(ex.Message);
ex = ex.InnerException;
}
return sb.ToString();
}
You can also use the EventLog class to write to the event log.
Info here:
http://msdn.microsoft.com/en-us/library/system.diagnostics.eventlog.aspx
Check out the examples - remember to register an event source first!
It looks like your program's missing a DLL (or the DLL's been misplaced):
http://social.msdn.microsoft.com/Forums/pl-PL/clr/thread/782217a8-46bd-4371-9915-28655d9b2c2f
Deciphering the .NET clr20r3 exception parameters P1..P10
A simple way around this would be to create a setup project - this will then bundle your project's dependencies into an install file. I don't think that option's available if you're on Visual Studio Express edition though. . .
http://www.dreamincode.net/forums/topic/58021-deploying-a-c%23-application-visual-studio-setup-project/
If you're pretty sure it's a .net framework that's missing, the following tool will show you what's on your machine / your client's, so you can figure out what's missing:
http://www.asoft.be/prod_netver.html
Hope that helps.
I had exactly the same problem and like Joao eventually found it was caused by the Windows Forms LineShape. This adds the Microsoft.VisualBasic.PowerPacks reference to your project. When you then run it on a system that doesn't have the PowerPacks installed you just get that unhelpful System.IO.FileNotFoundException error with no clue as to which file is missing.
Yes I know this should get fixed up if you go the trouble of making a proper distribution setup which will prompt the user to install ..., etc, etc. But I just want to be able simply to copy my EXE to another system.
To solve: remove any LineShapes from your form and then remove the refences to VisualBasic and VisualBasic.PowerPacks in your references.
David
[Using VS2008 SP]
I'm trying to get started with this library: 32feet
I have a Broadcomm Bluetooth Stack and haven't been able to figure out how to get this library set up. When I run my code, I get:
Unhandled Exception: System.PlatformNotSupportedException: No supported Bluetooth protocol stack found.
After digging around on their site, I found this: Installation instructions
It says to copy the appropriate DLL's into the project and then run the Test32FeetWidcommWin32.exe. I've tried putting the files in every single folder in my Visual Studio project and then running that EXE, but I still get the same error. Initially I tried just adding the InTheHand.Net.Personal.dll file as a reference to my project, but that didn't work either.
What could I be doing wrong?
It may also simply be that BlueTooth is not turned on in Windows.
I was using the .NET InTheHand library, and received this message only because BlueTooth was turned off in Windows, and resolved it by activating BlueTooth.
I just solved this. I think the problem was an old reference in my project to the NETCF version of the DLL from when I was trying to brute-force a solution, so I wiped my project clean and then started adding everything again and it worked!
A helpful tool to those trying to figure out their problem with this is to copy and paste the app.config file into your release directory with the app you are creating, and change the name to <YOUREXENAME>.exe.config. When you then run your EXE file, it should create a more detailed trace file. For mine, I found that coredll.dll was the culprit by not loading and was masked by the Stack not supported exception. After an easy Google search I found the problem to be with NETCF.
edit: To be clear, after I cleaned out my project a bit I re-added the reference to the correct InTheHand.Net.Personal.dll file and also added the 32feetWidcomm.dll file to my Release folder.