C# application doesn't work at my PC - c#

I've saw several Thread about similar problems. But I couldn't find proper answers for my situation. Please Help.
I have a application(about 10,000 line) developed on my PC(Windows7 64bit). Target platform is x86, and .NET version is 4.5.2. It is works fine when I run it on my PC in Visual Studio 2015 Debugging mode. It is works fine too, when I make it setup package, and install on my 4 friend's PCs and test. (A- window7 32bit, B - windows vista 32bit, C - windows7 64bit, D - windowsXP 32bit)
Just on my PC and, E - windows XP 32 bit, It isn't work.
On E, Installer isn't work. Error occur. And on my PC, Installer works properly, Install is completed perfectly. But when I run it, it doesn't show window form. just show me hourglass, beside mouse pointer....
All of tested PC have .NET 4.5.2, and up-to-date service pack.
Anyone know about this situation? Please Help.

As many have stated, the .net version you used is not working on XP.
This kind of things happens to me, when i forgot to properly add image resources to the project, or if some path to a file is not dynamic.
Many of my colleagues usually use a path to images like M:\Images\bla.jpg, and when come to school, of course there is no M disk.
Of course my examples are pretty newbie, but usually when something is not working as its supposed to, check the trivial things first =D
I believe that you haven't handled an exception the right way (although in most cases you would get an error message, but it happend to me that it doesn't).
As others suggested you, try add a logging system to the application, maybe this could solve you out.
Sometimes it helps if you rebuild the solution or code analyse.
Good luck!

Related

Why does my binary run on Windows 8 but not on Windows 7?

I have a Project in VC2013 x64 which compiles successfully. It also runs without any Problems on Win8, but crashes immediately before reaching main() on Win7 with the message:
"The application was unabel to start correctly (0x000007b). click OK to Close the application."
I already tried installing all vc runtimes there are. I tried it on several Win7 and Win8 Systems and it's always the same.
I'm not sure what could cause this, I also don't know which details about the projects might be important to figure the issue out. I wrote mayn Programs in VC before and never had such an issue. That's why I didn't check if the program runs on non-win8 pc during development, since my dev machine currently is win8. I'll post a few facts about this solution, maybe that info helps:
It uses boost.
it is c++/clr
it references another Project which is written in c# and uses some classes from it. The Platform target of this Project is set to "x64".
it uses curl
it uses vmware vddk (which is a C Library)
Also, the same happens if I install VC2013 on a win7 pc. It compiles perfectly but doesn't run on Win7 and crashes with the same message. I also tried swithing to the vc2012 toolset which results in the same Crash.
If you have any idea what could cause this, please post. I'm happy for even ideas that could cause this.
Thx
Marc
[edit]
I just tried adding
#define _WIN32_WINNT _WIN32_WINNT_WIN7
#include <WinSDKVer.h>
in front of
#include <SDKDDKVer.h>
in targetver.h . It still crashes with that error.
[/edit]
Ha! I found it! It was the boost libraries having some issue when compiled without /clr but linked to a program that uses /clr. The workaround I used is linking boost dynamically by using
#define BOOST_THREAD_DYN_LINK
globally and putting the corresponding dlls in the work dir of the process. There is more to read about this, it seems to be an old Problem. The new Thing seems to be that it runs on Win8 anyways. The links I found just report it doesn't work at all, maybe they haven't tried it on Win8:
Using boost in CLR
Boost Threads with CLR
boost mutex C++/CLI problems
http://lists.boost.org/threads-devel/2009/10/0502.php

C# Windows Form Project Loading Blank On Other Machines

I searched around but I could not find anything on this.
I have programmed a c# application in VS 2010, targeted to .NET Framework 4.0. It has a .DLL and a few config files which I have being copied to the output directory upon compilation. It works great on my computer, I have .NET 4.0 Extended and .NET 4.0 Client installed. I set the build configuration to "release" on "any CPU".
After it compiles I copy all the files from the release directory to a folder on a shared drive, so that multiple computers on the network can execute it. When I execute it from the computer that I used to develop it, it runs great. When others try to execute it starts but just shows a small blank form, and that's it. I make sure that they have .NET 4.0 installed (Both Extended and Client, though I think the full version is what is really required).
I can't for the life of me figure out why it does this.
All machines are running 32 Bit Windows Vista SP2.
Any thoughts? Much appreciation for any help.
It can be a lot of things. First, like one comment, you should do a quick Deployment project and try to install on another computer to see how it work.
If you can't do that, here a couple of things to check:
It can be a network permission problem. I've seens an .NET application that could not be executed on the network for x reason but worked on the desktop. To check, make sur your user copy it on their computer before executing.
I don't think it's a .NET problem because it wouldn't let you start the application.
My guess is that one of your control/library (the one that is not showing) does not have the proper reference when run from another computer. To check, run the application "Dependency Walker" (you can find it on google) and see what DLL are missing from other computers.
That's all I can think for now ! Good luck! You just have to use ellimination method and you will find the problem.

Run XNA 4.0 game on other machines

I checked here: How do I get an XNA 4.0 game to run on other machines?, but there's no real solution in it.
I created a completely empty XNA4.0 project, selected Release and compiled it, rar'd up the Release folder and sent it to a non-development PC. Got an Appcrash generic error.
Its probably something standard I'm doing wrong, but no idea what..
Can confirm that both .NET4.0, XNA Redist 4.0 and DirectX are installed on the other machine.
UPDATE: The empty 'new game' loads now, but I have made a program or six over the last years, each of which doesn't run on the other machine. Could someone perhaps link me to 'proper' referencing, assemblies, and such? Google dropped those words more than once in combination with my problem.
UPDATE: I asked a friend to test on his PC, at first, same error, but he forgot to install the XNA 4.0 redist. After that, my files were running fine on his pc. Still, they're not working on my own non-development machine, for some reason. Anyway, thanks for the suggestions, now that I know its local I can probably fix it myself. Suggestions are still welcome.
The end-user needs to have .NET 4.0, the XNA 4.0 Redistributable (not the full game studio), and DirectX installed.
Is there the Dot-Net 4.0 and XNA 4.0 framework installed?
Choose to publish the project and you will get an installer that check and install required libraries for you...

C# application crashes before start

I come to you because I'm desperate. I've developed a GTK# application in C# with the latest MonoDevelop. It's built for .NET framework 4.0 / x86, and the only external library it uses is the official Mysql .Net connector. It's meant to run under Windows XP.
It's the first application I make with this IDE. I was very happy with the results and the development time, but the deployment is a real headache.
It works perfectly on the development machine. The debug is clean. Everything's okay.
Then, as I couldn't find any information about the deployment, I installed a clean XP to try it and see what do I should install on the client's machine.
I've installed the SP3, .NET 4.0 and copied the release package with all the DLLs mentioned in the build log (that made it work outside the MonoDevelop in the development machine). But I'm getting a "the application has encountered a problem and needs to close" error, with no exception, in kernel32.dll, offset 0012aeb.
I've tried to install the .NET 3.5 before the 4.0, updated IE (just in case...), copied more GTK# and Monodevelop DLLs to the exe's folder, installed the Mysql .NET connector, installed Mono 2.8... But nothing. Still getting that unexplained error.
Google and StackOverflow searches didn't help me. I've researched and tried a lot of things in the last twelve hours or more without moving from this machine.
Do you have any advice? What can be causing it? Is there any way to debug the exe (without installing VS...)? Does anyone know what are all the dependencies of this kind of executable?
WinDbg can help you figuring some JIT trouble...
Even though it aint intuitive and require skills, Worth a try. might pop something up.
If it's meant to run under Windows, then you should probably compile it with the Visual C# compiler.
However, more related to your problem - get a debugger in your deployment machine and run the application on it. This is the best way to figure out the problem because we really can't guess it.
Mono Application Deployment Guidelines
There are several options to installing Visual Studio on your production machine, one of them is the Remote Debugging Monitor. It does not require a Visual Studio installation. You can copy the files from your development machine to your server. I've got them under C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Remote Debugger.
You can also use it for Remote Debugging of a Project Built Locally.

.NET 4 Program written/compiled on Windows 7 machine won't run on XP

I have an app that I wrote using C# .NET 4.0 in Visual Studio 2010 on my Windows 7 Ultimate machine. This app works fine on both Vista and other Windows 7 computers, but whenever someone running Windows XP tries to run it it crashes.
In order to reproduce this I've tried running it on my Win XP VMWare machine and it crashes for me in there. Unfortunately it doesn't give me any specific error, just informing me that the program has crashed and needs to close.
One other user sent me the following:
Run-time error '339'
Component 'vbalSGrid6.ocx' or one of its dependencies not correctly registered: a file is missing or invalid.
Code 0xe0434352
Flags 0x00000001
I don't get that particular bit when I try to run it on my Virtual XP machine, and I also made sure to install .NET 4.0 on there.
What could be causing this, and why won't the app run in XP if the .NET 4 framework is supported for XP?
Components used in the program: DataGridView, ComboBox, Buttons, Labels, LinkLabel, NewtonSoft's JSON parser, and that's about it.
I am baffled and have utterly no idea where to start. Ideas?
UPDATE: Hmm, tried running my other recently created application on XP and it loaded fine. The only major difference (in the components I used anyway) between the two is my use of NewtonSoft's JSON library, which I actually think is a .NET 3.5 component.
UPDATE 2: Just for kicks I tried running the program on my Wind7 machine in "Windows XP SP3" compatibility mode and it ran fine. Of course, I have no idea just how closely the "compatibility mode" emulates a true XP SP3 environment, but I figured I'd give ya'll the info anyway.
¡¡ IT WAS THE APPLICATION ICON !!
I kept noticing that the module it referenced in the error it gave me was system.drawing which I thought was odd. I figured perhaps the PictureBox I was using was causing the issue, so I tried disabling everything to do with that, to no avail.
I had my business partner set up his XP box so that we'd have another machine to test with aside from my VMWare XP box just in case there was some odd issue with it.
After he got it set up and the app copied over he said "The icons look like DOS ones" and I had a eureka moment.
I was using .PNG's as the icons because they support transparencies and whatnot, but XP doens't natively support them. So when the app was copied to the desktop it just used a generic icon for it, and when the application was run it crashed because XP doesn't know how to render a .PNG.
Try using the Fusion Log Viewer to debug startup errors in .NET applications.
Scott Hanselman has written a nice howto along with links to further resources if you need to go deeper.
Are we sure this is some wierd .NET compatibility issue or just a run of the mill bad installer/deployment problem?
Here's one user who has that error message because the OCX DLL was copied to System32 with a shortname. Renaming the DLL to the correct name and running RegSvr32 resolved his problem.
Do you have an installer? Have you correctly identified all of your managed and unmanaged dependencies and properly authored them into your installer?
http://forums.elmsoftware.com/forum_posts.asp?TID=119

Categories