未安装 Visual Studio 时应用程序崩溃

发布于 2024-12-02 10:39:46 字数 1151 浏览 1 评论 0原文

代码太大,无法发送到这里,我不知道哪些部分很重要。我在我拥有的每台电脑上都进行了尝试,但其中任何一个都不起作用。 VS2010 编译代码时没有任何警告或错误,并且可以正常运行应用程序,如果我仅从操作系统启动应用程序,也可以正常运行。当我把它放在不同的电脑上时不起作用(我到处都有 Framework 4.0,其他我的应用程序工作正常)。

在我的笔记本电脑(win xp)上,它显示“程序遇到问题,需要关闭...”。标准 Windows“发送/不发送”错误没有说明问题的具体情况。

在我的电脑(win xp)上,它说的内容与我在笔记本电脑上安装的 Visual Studio 相同,并且它开始正常工作。当我卸载 VS10 时,它再次崩溃,并显示“未处理的异常,未找到即时调试器...”,同样没有任何具体问题。

我的朋友带来了他的笔记本电脑(win 7),没有显示任何消息,但也没有应用程序。它没有做任何事情,没有消息,没有应用程序,甚至没有启动进程。当我点击图标时,等待光标出现 2 秒,仅此而已。

每次同样的事情甚至没有任何形式显示它就会立即崩溃。应用程序实际运行的唯一电脑是我创建它的电脑(win 7),当然安装了 Visual Studio 2010。我相信其他电脑会丢失一些随 VS2010 安装的文件或 .dll 以及其他垃圾。有什么想法要寻找什么吗?我无法在任何地方安装 VS,它很大,就像说“你需要 adobe Premiere 才能观看视频”。

编辑: 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()

[解决方案] 好吧,虽然没有完全解决,但我能够在 InitializeCoponent() 中找到导致崩溃的 GUI 组件。这是愚蠢的LineShape!我真的不明白为什么它不能在所有地方正常工作!因此,如果每个人都有类似的问题,请尝试这个解决方案!

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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

执手闯天涯 2024-12-09 10:39:46

听起来您正在尝试在没有调试 dll 的计算机上运行调试版本。尝试编译一个发布版本,看看是否有帮助。

附录:

另一件事可能是(但这实际上只是猜测,没有具体细节)是 64/32 位差异。如果您尝试运行的程序执行 P/Invoke,则这可能是一个问题。如果您的项目设置为针对任何 CPU,则它将在 64 位操作系统上作为 64 位程序运行,在 32 位操作系统上作为 32 位程序运行。尝试专门针对 x86 并查看是否会改变任何内容。

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.

来日方长 2024-12-09 10:39:46

我首先想到的三件事是:

  • 缺少一些 .NET 库。如果它是针对 .NET 4 进行编译的,则可能需要完整的框架,并且只能找到较小的“客户端”版本。检查可再发行版本。
  • 缺少 C++ 库:如果是 C++ 程序,除了 .NET 之外,还需要安装 C++ redist。
  • 调试/发布:如果在调试配置中进行编译,程序将寻找调试.NET(和C++)库,这些库不是由可再发行包安装的。使用Release配置编译可以解决这个问题。

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.
时光病人 2024-12-09 10:39:46

尝试根据 .net4 客户端配置文件进行编译

Try to compile against the .net4 Client Profile

傲世九天 2024-12-09 10:39:46

除了建议确保进行发布构建的答案之外,请检查您的项目设置:在调试选项卡上的“调试器”部分禁用选项“启用 Visual Studio 托管进程”< /em> 在您的调试发布 配置中。

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.

第几種人 2024-12-09 10:39:46

整个早上都在与这个问题作斗争,现在已经解决了,以及为什么会发生。发帖希望对其他人有所帮助

,我安装了 Krypton.Toolkit,它将工具自动添加到 Visual studio 工具箱。然后我将工具添加到设计器中,设计器自动将 dll 添加到项目引用中,但是工具包被标记为 CopyLocal=false

我构建了一个安装程序,使用发布构建文件夹中的所有 dll(当然上面的 dll 不是)那里)。

设置 copylocal=true,然后重建安装程序,一切正常。

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.

合约呢 2024-12-09 10:39:46

过去两天我只需要处理这个错误。事实证明,对于目标框架为 .NET 4.0 或 .NET 4.0 CP 的项目,有一些 .NET 4.5 中不存在的 DLL,在我的项目中是 Visual Basic DLL。

将文件打包到安装程序中的 InstallShield 项目也无法检测到此依赖性。

中名为 Microsoft.VisualBasic.PowerPacks.Vs.dll 的 DLL

我的项目是一个升级到 Visual Basic .NET (VB.net) 的 Visual Basic (VB6) 项目,它以某种方式需要位于C :\Program Files\Reference Assemblies\Microsoft\VBPowerPacks\v10.0

我只是在意识到该项目在安装了 Visual Studio 的情况下运行良好,但崩溃时没有任何特定警告,然后才发现这一点崩溃日志中的“System.IOException.FileNotFound”。在 Visual Studio 中浏览我的项目的对象资源管理器,并通过将其添加到 InstallShield LE 项目中一一尝试每个 DLL,构建并将其复制到安装了发布软件的 VM,使我(最终)得到了这个解决方案。

希望这对其他人有帮助。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文