Hi,
I just finished working on a Windows application using .NET 3.5 Framework - developed in C# with Visual Studio 2008. I am now testing deployment and on the first Vista system I ran into (Home Premium SP1), I had to use Compatibility Mode to get my application to be allowed to run.
I would understand needing compatibility mode if this app was compiled some time ago with an older Visual Studio or .NET Framework, but this is new development with Visual Studio 2008 and .NET 3.5. I can't believe that Visual Studio would not have support for Vista. Well I can believe it, but there should at least be some documentation.
I feel like I missed an important memo about Vista deployments.
Am I missing a build or compile setting somewhere?
Also, what should I expect with Windows 7?
I appreciate any information that can be provided.
Loading
Sam HobbsPosted Dec 13, 2009, 12:15 PM
Bill AzPosted Dec 11, 2009, 9:10 PM
Are you absolutely totally sure that your program does not begin to execute, not even the first line of code? How are you sure?
I guess I can't be 100% sure that it is not encountering any errors but I do have Try Catch throughout. Also, I write runtime status to a log during execution and do not see any of these. Perhaps writing to the log in Vista without Compatibility is my problem, but I have a Try Catch around all of that code so I would hope to at least see an exception message. I think Vista is not even allowing the exe to execute, but not sure - just my own assessment of what I see happening. I can't run debug on the target pc - it does not have a development system on it.
All I know is when I use compatibility mode in Vista or run it on XP it runs fine and has for multiple builds. I only have this situation running on Vista (and probably Windows 7).
I am trying to understand the difference between XP and Vista which is why I posted.
Sam HobbsPosted Dec 11, 2009, 8:23 PM
Sam HobbsPosted Dec 11, 2009, 8:18 PM
It is entirely possible that you are missing some error detection code. Your program might be encountering an error that you are not checking for in your program, and since you ignore it, there is not much that the system can do except say your program is not working. It is quite common for programmers to not make enough effort to catch errors. It is a hassle. Unfortunately that leads to errors that are difficult to diagnose such as what you are encountering. Your problem might be different but it would be easier to diagnose and fix the problem if that is the problem.
What type of program is is? Is it a console program? Put a breakpoint on the line of code that would normally be the first to execute. Then debug. If the breakpoint is hit then you know that the program does begin execution. You can single-step through each line of code until a function returns an error. Check the return code of every function executed.
You should go through your program and add try/catch wherever it might be approriate. Even if that does not solve your problem, it is likely to prevent problems in the future.
Bill AzPosted Dec 11, 2009, 7:56 PM
I don't know. I am not familiar with either of these.
I just created a new Windows application project and used all the defaults.
Where would I look for thee and what should they be?
thanks...
patrickPosted Dec 11, 2009, 12:04 PM
Bill AzPosted Dec 10, 2009, 6:56 AM
- My PC is running XP SP2
Main Application
- Build Configuration: DEBUG
- Platform: Any CPU
- Output Type: Windows Application
Target Framework: .NET 3.5
RichTextBoxPrintCtrl DLL
Output Type: Class Library
Target Framework: .NET 3.5
My Setup Project creates an MSI and Setup.EXE.
The setup runs fine on Vista, however, when I try to launch the application, I get a Vista message box "MyApp.exe has stopped working". "A problem caused the program to stop working correctly....".
At this point, I fond that my program was not even starting (via runtime logs in my app).
I used the Vista Program Compatibility Wizard and specified the following to get it to run:
- Operating System Recommended: XP Service Pack 2
- Run this program as an administrator
I don't understand why I need to specify these and run as XP SP2.
Are there some build options/settings that I am missing?
patrickPosted Dec 9, 2009, 3:56 PM
What method of deployment are you using?
ive run applications developed in c# in VS2008 on xp and vista without an issue, there must be a strange setting somewhere. Is your computers .net framework up to date?