3

I'm aware that a lot of topics about similar problems exists but none of them solved my issue.

So I have an aplication, which works perfectly.I added to the solution the installShield-wizard-setup-something for me to be able to install it everywhere. I tried on my computer (the one with whom I created the program) and it worked!

I installed it on another PC and after the installation (which was fine) when I cick to run the .exe, there is a quick loading (the cursor turns into a blue circle) and then nothing..

Nothing in the processes, nothing in the logs, running it as admin didn't work. I tried to install it elsewhere but same thing happens. I also checked the .NET version and it's the right one.

I don't know what other informations to tell, so please feel free to ask me if you have a clue. I'm running out of solution here.

EDIT : Actually in the processes I see my application during the quick load. enter image description here The result of Dependency Walker

  • Is it looking for a file on the local PC (the one with whom you created the program)? – djv Apr 15 '16 at 01:37
  • Check in Event Viewer and in Process Explorer if you can spot anything. – aybe Apr 15 '16 at 01:38
  • Maybe! How can I find out which one and solve it? – UnderPaidIntern Apr 15 '16 at 01:38
  • 1
    Usually that means you have a file on your machine that is required that isn't being copied to the output directory. In Solution Explorer you can right click on all of the items that make up the project and choose properties. Look at the property Copy to Output Directory. If it is an item that will be required that the PC where it will be installed, then make sure it is set to Always or If Newer – GreatJobBob Apr 15 '16 at 01:39
  • Well, it sounds like it's a click-once deployment, in which case it shouldn't work on his PC either. For a missing assembly reference, there would be a somewhat more verbose message about not being able to run. I'd look for a file being referenced in "C:\users\underpaidintern\docs\.." etc. – djv Apr 15 '16 at 01:45
  • @GreatJobBob I did what you said but now I have _Error 2 -6225: Resolving Visual Studio .NET project output "MyProj\MyProj.csproj\|ContentFiles" ISEXP : error : -6225: Resolving Visual Studio .NET project output "MyProj\MyProj.csproj\|ContentFiles"_ Is it normal? Is there a way to solve it? – UnderPaidIntern Apr 15 '16 at 01:53
  • I think you have to go back and change all the items back to Do Not Copy, Most of the files do not need to be copied as they will be compiled into the exe, but If you are referencing any local resources in you application. then you need to include that in the project and copy it to the output folder. – GreatJobBob Apr 15 '16 at 02:26
  • Might be useful: http://stackoverflow.com/questions/255669/how-to-enable-assembly-bind-failure-logging-fusion-in-net – David Brabant Apr 15 '16 at 06:28
  • Tbh I don't understand shit of this, So if someone has some spare time and wants to see if my application works on his computer, let me know! – UnderPaidIntern Apr 15 '16 at 06:48
  • UnderpaidIntern - Im guessing your company want you to "learn this shit" then .. most of us have learnt this, often without the aid of stack overflow and its actually not that hard to learn. Computers are simple logic beasts. Look at the references your app has, if it worked on one machine and not another you've installed it on, whats different about them? (rhetorically) what does your app do? does it connect to something? or rely on something, that the non working machine may not have or have access to? – BugFinder Apr 15 '16 at 08:53
  • Hi @BugFinder, yeah maybe I'm not as smart as you.. It is just very frustrating when you have no errors, nothing and it still doesn't work. Anyway my application has a local database (I don't think it's the issue) and some word template document. All of this is in the folder with the right path. I'm using Office.Interop.Word but as Microsoft Office is installed int the PC it shouldn't be a problem. and all the other references are from System.something and was already on Visual Studio. – UnderPaidIntern Apr 18 '16 at 00:55

1 Answers1

1

It could be that your application uses some Dll's which needs other Dll's and so on. I got this problem sometimes. For me the Dependency Walker is very useful to find every dependency of your program and the sub dependencies. Dependency Walker is a free tool which you can download. Just open dependency walker, select your program exe (on your development Computer where the program works) and check the shown dependencies with the files on your destiny computer (where the program don't works). Maybe you find some missing Dll's.

Here an example for AMSI.dll:

Here an example for AMSI.dll

At first check on the destiny computer this dll's. Are one of them are missing, copy manually the Dll from your development System and make a note that you copied this dll.

If all Dlls on the computer and your program still not works, continue with the next layer. Open the dll's and check their dependencies:

Layer 2

Ignore the red crossed ones. Just look for the dll's with "normal" names.

Just continue with the other dll's layer for layer. In my cases the second layer was enough to run the program.

Ps. Normally it's enough to check the first listed Dll's like Kernelbase.dll and not Dll's like API-MS-WIN-CORE-PROCESSTHREADS-L1-1-3.DLL ... you will see what I mean. (Look at picture 2 (Layer2))

Nik Bo
  • 1,410
  • 2
  • 17
  • 29
  • Hi, thanks for your answer! But I have like one thousand errors of missing dll :o What to do to solve it? Do I need to download them? If I do, how to add them at the setup for it to work in every pc? – UnderPaidIntern Apr 15 '16 at 08:25
  • You must find the "core" dll's which are missing. There are some dll's which you don't need. You must find the main dll's which are needed to run your program. You can orientate on the names of the found dll's. Try to work from layer to lay. At first all dll's your program needs then the dll's which needed by the dll's. Search them on your development pc and copy them into the exe folder on your second pc. Then try to run. Does it not work? Then copy the next. It's many work but on this way you find all needed dlls. Note all copied dll's. If you bring your program to run add them to the setup. – Nik Bo Apr 15 '16 at 08:34
  • @UnderPaidIntern I've added some text and pictures to my post. Hope this helps you and you bring your program to run. – Nik Bo Apr 15 '16 at 08:42
  • I did what you said, looked for the dll with a red square next to their name, and then donwload and put them in my debug file. But same issue, maybe I misunderstood you – UnderPaidIntern Apr 18 '16 at 01:26
  • You copied the files to your Application folder on the Computer where the program not works? Or in the Debug folder on your development PC? – Nik Bo Apr 18 '16 at 05:59
  • In the application folder in the PC where it's not working! but I think that I have a big problem, I have dll missing in each "big" dll. I can't copy each one right? And why do I have so many missing, something is wrong in my computer? Too bad I can't show you a picture or something.. – UnderPaidIntern Apr 18 '16 at 06:20
  • You could add a screenshot to your post. Maybe i could help you with this. – Nik Bo Apr 18 '16 at 06:25
  • Here it is, you can see at the right that the scroll bar is very small! There is an insane amount of missing dll – UnderPaidIntern Apr 18 '16 at 06:47
  • Ah okay. Try to focus just on the upper left Window and take a look at my latest Screenshot. There are many Dlls which you can ignore. Essential are dlls like MSCOREE.dll not dlls like API-MS-... or EXT-MS-... – Nik Bo Apr 18 '16 at 07:22
  • Ok, so I downloaded only the one big MSCOREE.DLL as there is only this one at this layer and I put it in the application folder, but it's worst :o now every single dll is missing or broken (red squre with black hole inside) – UnderPaidIntern Apr 18 '16 at 07:37
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/109404/discussion-between-underpaidintern-and-nik-bo). – UnderPaidIntern Apr 18 '16 at 07:45