Application crash without Visual Studio installed

2019-02-22 20:22发布

Code is to large to send here, and i don't know which parts are important. I tried on every pc I have and it doesn't work of any of them. VS2010 compiles code without any warning or error and runs application fine, also works fine if I launch the app simply from the OS. When I put it on different PC doesn't work (I do have Framework 4.0 everywhere, other my apps works fine).

On my laptop (win xp) it says "Program encountered the problem and needs to be closed...". Standard windows "send / don't send" error say nothing specific about problem.

On my PC (win xp) it was saying same thing as on the laptop than I have installed Visual Studio there and it started to work fine. When i uninstall VS10 it crashed again with massage like "unhandled exception Just-in-Time debugger not found...", again nothing specific about problem.

My friend bring his laptop (win 7) and no message showed up but no app either. It didn't do anything no message, no application, not even process started. When i clicked on the icon wait cursor appeared for 2 sec and thats all.

Every time same thing no form is even showed it crashes instantly. Only pc where app actual works is PC (win 7) where I create it, with Visual Studio 2010 installed of course. I believe that other PCs miss some files or .dll and other junk which is installed with VS2010. Any ideas what to look for? I can't install VS everywhere its large and like saying "you need adobe premiere to watch the video".

EDIT: Events in Windows:

Application: Floorball.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.FileNotFoundException
Stack:
   at Floorball.Interface.InitializeComponent()
   at Floorball.Interface..ctor()
   at Floorball.Program.Main()

[SOLUTION] Well not exactly solved but I was able to found GUI component in InitializeCoponent() which is causing crash. Its stupid LineShape !! I dont realy understand why its not working properly everywhere ! So if every body has similar problem try this solution!

6条回答
兄弟一词,经得起流年.
2楼-- · 2019-02-22 20:46

Try to compile against the .net4 Client Profile

查看更多
\"骚年 ilove
3楼-- · 2019-02-22 20:50

First three things that come to my mind:

  • Some .NET libraries are missing. If it has been compiled for .NET 4, it might require the full framework and it only finds the smaller "client" version. Check the redistributable.
  • Missing C++ libraries: if it's a C++ program, you need to install the C++ redist in addition to the .NET one.
  • Debug / release: if you compile in the debug configuration, the program will seek the debug .NET (and C++) libraries, which are not installed by the redistributable packages. Compiling with the Release configuration solves this problem.
查看更多
爷的心禁止访问
4楼-- · 2019-02-22 21:02

In addition to the answers suggesting to ensure you make a Release Build, check your projects settings: On the Debug tab, section "Debuggers" to disable the option "Enable Visual Studio hosting process" in both, your Debug and your Release Configuration.

查看更多
你好瞎i
5楼-- · 2019-02-22 21:03

Sounds like you're trying to run a debug build on machines without debug dlls. Try compiling a Release version and see if that helps.

Addendum:

Another thing it might be (but it's really just guesswork without specifics) is 64/32-bit differences. If the program you are trying to run, does P/Invoke, this can be an issue. If your project is set to target Any CPU, then it will run as a 64-bit program on 64-bit OS and 32-bit on a 32-bit OS. Try to target x86 specifically and see if that changes anything.

查看更多
劫难
6楼-- · 2019-02-22 21:06

Have been fighting this all morning and now have it solved and why it happened. Posting with the hope it helps others

I installed the Krypton.Toolkit which added the tools to the Visual studio toolbox automatically. I then added the tools to the designer, which automatically added the dll to the projrect references, however the toolkit was marked as CopyLocal=false

I built an installer, using all dlls in the release build folder (of course the above dll wasn't there).

Setting copylocal=true, then rebuilding the installer, everything worked fine.

查看更多
Anthone
7楼-- · 2019-02-22 21:10

I just had to deal with this error for the past 2 days. It turns out that for a project with the Target Framework as .NET 4.0 or .NET 4.0 CP, there are some DLLs that do not exist in .NET 4.5, in my project's case Visual Basic DLLs.

The InstallShield project that packages the files into the installer also fails to detect this dependency.

My project was a Visual Basic (VB6) project upgraded to Visual Basic .NET (VB.net) and it somehow needed the DLL called Microsoft.VisualBasic.PowerPacks.Vs.dll located in

C:\Program Files\Reference Assemblies\Microsoft\VBPowerPacks\v10.0

I only found this out after realizing that the Project runs fine with Visual Studio installed, but crashes with no specific warning other than 'System.IOException.FileNotFound' in the crash log. Going through the Object Explorer of my Project in Visual Studio and trying each DLL one by one by adding it to the InstallShield LE project, building and copying it to a VM installed with release software allowed me to (eventually) arrive at this solution.

Hope this helps someone else out there.

查看更多
登录 后发表回答