Docker for Windows exe fails inside Container - windows

In-House developed .exe file is failing in container, it prints no error, and just returns the exit code -1073741515. The exe seems to be running fine on other machines. I understand this error code means it's missing a DLL File or Library but I don't which one.
It's a windowsservercore based container. Running no other application except this .exe, and running it on Command Prompt, although Powershell also return same exit code.
I took a dump of it using dumpbin tool (which comes with Visual Studio), to check which DLL files it uses, and my container is also having all those DLLs
I tried Dr. Memory tools like drmemory.exe and it says the WARNING: libraries needed by the application are missing. Check that it runs successfully on its own and check that all needed libraries are in its directory or on the PATH.
I am running out of options to troubleshoot. How can I find what is causing this .exe to fail or any missing dependency?

Related

Run "armasm.exe" failed: "The application was unable to start correctly (0xc000007b)

I installed both VS2013 and VS2015 Professional (full install), and both have a "armasm.exe" under the bin folder. I set the bin folder into "path" environment variable. When I tried "armasm /?" under cmd, it prompts out a dialog box with a red cross sign, saying that:
The application was unable to start correctly (0x000007b). Click OK to close the application.
I wonder if this program is for ARM CPU's assembly language. Does this program only run on ARM machine that installed VS?
How can I get it to run?
I assume you're talking about the armasm.exe file in the \VC\bin\x86_arm folder? If so, then no, that is an x86 binary, not an ARM binary. It will run on your machine.
It is actually an ARM cross-assembler for x86. That means it allows you to assemble ARM binaries on an x86 host. Think of it like the x64 cross-compiler for x86 (in the x86_amd64) folder. That can compile 64-bit binaries on a 32-bit x86 host.
The reason you can't get it to start is because the environment has not been set up correctly, and required dependencies cannot be located. When I try to start it, I get a more descriptive message than you do:
System Error:
The program can't start because msvcdis140.dll is missing from your computer. Try reinstalling the program to fix this problem.
You are meant to use the vcvarsx86_arm.bat batch file (in the same folder) to get your environment set up correctly, before trying to run any of the tools. Step-by-step:
Open a new Command Prompt.
Drag in vcvarsx86_arm.bat, and press Enter to run it. This sets up your environment to run the x86/ARM tools.
Drag in armasm.exe (or simply type armasm.exe into the prompt, unqualified). It will now run because the environment has been correctly set up (including the path, so that it can be found without requiring the full path to be entered).
There is also a \VC\bin\amd64_arm folder. This contains tools for ARM executables that run on x64 hosts. You use those in exactly the same way, except you launch the vcvarsamd64_arm.bat file in that folder first.
It is worth noting that I also see a \VC\bin\arm folder, but (at least in my install of VS 2015) that contains only one EXE: pgosweep.exe. Microsoft does not appear to provide an ARM assembler that runs on ARM platforms. Which makes senseā€”I don't think ARM is a supported host for development. Visual Studio certainly hasn't been ported to ARM. Just use the ARM tools on x86 or x64.

Visual Studio Code not loading symbols on OS X

I am trying to set up a web api using ASP.NET Core on OS X. I have set up my environment correctly (I think) and I'm able to build and run my application using dotnet build from the terminal, and I'm able to start debugging from Visual Studio Code with breakpoints working as expected. My problem is that I receive an error when trying to query my Sqlite database using EF core. EF core is not really important here, because when I am debugging and trying to find out what the error is, I don't get any stack trace. When I step over the failing code the debug console prints:
Exception thrown: 'System.InvalidOperationException' in Microsoft.EntityFrameworkCore.dll
Loaded '/usr/local/share/dotnet/shared/Microsoft.NETCore.App/1.0.0/System.Diagnostics.StackTrace.dll'. Cannot find or open the symbol file.
Loaded '/usr/local/share/dotnet/shared/Microsoft.NETCore.App/1.0.0/System.Reflection.Metadata.dll'. Cannot find or open the symbol file.
Loaded '/usr/local/share/dotnet/shared/Microsoft.NETCore.App/1.0.0/System.IO.MemoryMappedFiles.dll'. Cannot find or open the symbol file.
Loaded '/usr/local/share/dotnet/shared/Microsoft.NETCore.App/1.0.0/System.IO.UnmanagedMemoryStream.dll'. Cannot find or open the symbol file.
A lot of these Cannot find or open the symbol file. are printed at startup as well. I have checked that the files are at the location specified, and that there shouldn't be any read access problem (having started vs code with sudo code . and even done a sudo chmod 777 * in the folder in question).
So, any ideas why the symbols aren't loaded?
Ran into the same issues running VS Code on a Windows 10 VM.
The resolution I found was to add a "debugType": "portable" setting to the buildOptions section of my project.json file.
Mine looks like this:
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true,
"debugType": "portable"
}
Debugging in VS Code isn't that bad actually.
I think you have confused what VSCode is saying it cannot load. It isn't saying that it can't load the DLL. 'Symbol' files have a .PDB extension. In order to debug an error generated by a DLL, a debugger needs the corresponding symbol file, so changing the permissions on the DLL won't make the error go away if the PDB file is not there.
I've just started using VSCode on a Mac and from what I can see, you don't get the PDB files if you install dotnet core with Homebrew (which is what they recommend) and I see similar messages when I startup the debugger. That doesn't stop me from debugging my own code because there is a PDB file generated with my DLL. It would only cause a problem if you needed to debug something going wrong inside dotnet core itself.

DLL missing error when EXE run from command line [VS2010]

So I built an SSH-connect-test console application using libssh library, and is dependent on ssh.dll.
The application works perfectly fine when run from inside VS2010, but gives "ssh.dll missing from your computer. Reinstall the program" error when the same EXE is run from the command prompt.
Any inputs as to why am I seeing this dual behaviour of the console application from inside and outside of VS2010?
Thanks.
you should download ssh.dll by searching it in google .when the file downloads ,paste it in your application directery
download it here
http://originaldll.com/file/rebex.net.ssh.dll/29300.html
Solved.
Had to copy the dependencies (DLL) inside the /Release or /Debug folder to run the EXE.

VB6 Exe not running another computer showing runtime error

My Visual Basic 6 EXE is not running on another machine...
I have built a VB6 EXE and put in a server.
Both in server and my local system, the EXE is running successfully. But when I am trying to run the exe inside the server computer, from my local system, it is some time running , sometime not running (most of the times it is not running).
All DLL files are properly configured, I cross-checked.
It is showing the error message (as per my code, error message must populate at any stage) as : Run time error '-2147467259(80004005)'
Did you try to download and install the runtime files on the machine that doesn't have VB6 installed?
You can find the setup for the runtime files here: http://www.microsoft.com/en-us/download/details.aspx?id=24417

Nuget.exe crashes when invoked from cmd.exe

I'm trying to automatically download Nuget.exe from a Rakefile, in order to minimize the amount of initial setup needed to run my samples on GitHub.
I've understand how to download a file (I'm using HTTParty) and how to save a binary file (using the b flag on File.new) but now I've got problem running Nuget.exe. In particular:
if I launch it directly or from PowerShell, the executable runs fine;
if I launch it from cmd or from a Rakefile (which in turn runs cmd), Windows tells me that the program "stopped working".
I reproduced the same behavior with the Nuget bootstrapper, so I thought that the cause was some configuration in my computer.
It then occured to me that I installed ansicom, a library to handle ANSI sequences. I disabled it and then Nuget started without any problem.

Resources