开发者

C# WinForms App won't run on Win7 after Building

I have a program that I built that reads and writes files. I built it in Release mode, then tried to run the exe on Win7. At first, with troubleshooting on, Windows simply told me the application closed and it was looking for a solution. After a few seconds, the dialog would disappear and show nothing more.

So with some significant effort I got the debugger attached to the process, but it was only showing me disassembly, which tells me that the error开发者_StackOverflow中文版 taking place wasn't in my application code, but in the framework somewhere.

The strange thing is that when I let the debugger attach, then press "stop" in VS, and exit the debugger, the program actually runs at that point!

So now I'm stumped. I have an application that builds, that seems to be having a permission error when I run it, but if I let the debugger attach then close it, it runs, and there's no Exception to really look at.

How I troubleshoot this issue?

Edit: Responding to Merlyn:

It's a custom app written from scratch in c#. The only dependency it has outside of core .NET namespaces is the Ionic.Zip DLL.

Visual Studio 2008 (Writing in C# 3.5) Windows 7 - Home Premium, v6.1 build 7600 CPU - x64 quad core CPU are you compiling under: Any CPU

I haven't tried it on another machine or a different version of VS.

Edit: I was able to try the compiled version on another win7 computer, and it worked without issue, so it looks like a security (?) issue on my computer only.


Try it in the debugger with Just My Code disabled and Native Code enabled, then check the call stack.

Also, what happens if you run it directly in Visual Studio?


Uncheck Enable Visual Studio Hosting Process in Project Properties and see whether it still works in VS.


I'd suggest sending the issue to Microsoft support. Especially with the data given here, you will have an easy time convincing them it's their problem. You might need an MSDN subscription for that.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜