I develop a windows application on c#.
I have tried it on different PCs with XP operating system, but I had a problem when I start to run on PC with windows 7.
The program is closed automatically.
I use SQLite for database and interaction with php files in the program.
Just guessing, could it be that the Windows 7 operating system is 64-bit? If yes, and you're using the 32-bit version of SQlite, you might have forgotten to make your C# a 32-bit only project.
To do so, open the project properties, and on the Build page, select x86 (which means 32-bit).
Related
Would it be possible to code and compile C#, on a Windows 8 Tablet (WinRT) (the ARM processor edition)?
Basically it comes down to this:
Is there a C# compiler that runs on ARM?
Is there and IDE that can run in WinRT?
If the above is true, I don't see any issue, but I currently can't find if the C# compiler runs on ARM (only a lot of posts about compiling for ARM). I've also looked at SharpDevelop, and found that their source code compiles for "Any CPU", which according to this post: Windows RT and c#, means that it'll run on ARM.
Sharpdevelop however requires .NET 4.0 "Full" runtime, which I couldn't find if WinRT has or not. I'm betting it doesn't, as WinRT is supposed to be a really lightweight edition of Windows.
As a sidenote, I know that Windows tablets will come in two editions, one for ARM and one for classic processors. The classic processors will run a normal Windows 8 edition, which means it can run all the native applications. Compiling C# wouldn't be an issue here - so the question is rather, can I do the same on ARM?
This would be awesome for travelling and trying out new ideas quickly.
Currently: no, and no.
It would certainly be possible to build a Windows Store app that contains an IDE and a C# compiler. However, you would not be able to run any programs built using such an app. Windows Store apps run with reduced privileges in a sandbox. In this sandbox, the CLR will only load system assemblies and assemblies contained in the app package. The app package is immutable and cannot be modified at runtime.
Actually, the .Net framework on the surface includes csc.exe, the Csharp compiler.
I've gotten code to compile, but WinRt doesn't seem to like it being run without proper signing.
The IDE won't happen for a while, not yet at least. I'm sure that with proper signing, it is possible to run a compiled executable.
Or the other guy might be right and it isn't just an issue of signing.
I've ported SharpDevelop to run on unlocked Windows RT devices, it works at least for C# Windows Forms apps. http://chentiangemalc.wordpress.com/2013/03/18/sharpdevelop-rt-edition-beta-code-windows-forms-directly-on-windows-rt/
I have a huge problem on one of my winform application. Someone who use my application works on windows 7 64bits and apparently it directly crashes when the application is launching.
My application works correctly on :
-Windows XP
-Windows Vista
-Windows 7 (32bits).
I developped the application on Visual C# express 2005 (.NET 2.0).
I am wondering if there is anything I can do to recompile my application to make it work on windows 7 64bits.
I am sorry, I have no access to the computer of the person (so I can't check, exception or anything like that). I am pretty sure that this issue is known that's why I'm asking you right now.
Does anyone have an idea ?
Thank you by advance for your Help
Regards,
Joze
In project properties setting window, select tab Build and change Platform target to X86. Republish..
EDIT: to the down-voter
By doing this Windows will know your program is designed for X86 use and will install it accordingly. (I've done this with Clickonce, and it works..)
Likly you use some interop x86 DLL or COM object. Try setting for your executable Target Platform x86 (not Any CPU as it is by default).
Do you use any unmanaged (com) components in your application?
If so, most likely you're including the 32bit version. If that's the case, you will have to compile 2 different versions of your program, one including the 32bit components, and the other including the 64bit components.
If that's not the case, it means you're using some platform specific code somewhere. More details about your application could help clarify the problem.
I'm working on a form application, I use plenty of hardware, Wiimote, USBjoystick and serial port. It all worked fine under 32bit windows, but I had to upgrade to 64bit for some other apps I'm working on.
I did some research and it is possible to develop x86 apps under x64 system, but now I don't know if this is what I want. The trouble maker is obviously directX sdk. AFAICS another option is, to install a virtual x86 machine specificly for developing this app (I don't want dual boot). I've never used this before, so I'm kinda worried that all this hardware won't work under virtual machine.
I'm using wiimoteLib and blueSoleil to connect bluetooth. So will this work. And do I use windows 7's virtual xp option, or a different virtual machine software? I'd probably use winXP as a virtual OS.
32 bit applications run perfectly fine on 64 bit operating systems. I have lots of my applications developed for 32 bit and they run without any issues in 64 bit. As you say you have lots of hardware used we can't be sure which may work or may not work.
best solution is to run your app in 64 bit and see if anything is not working (I am sure 95% will work) and then come back here with specific questions.
Inside IIS (7) click on Application Pools.
Find the Application Pool that is configured for your web application in the list.
Select it, then click Advanced Settings on the right.
Second setting in the list: Enable 32-Bit Applications - must be set to True.
When compiling your application in Visual Studio, try setting the target platform to x86 rather than "any CPU" (Project options/build/target platform).
I had the same problem running a 32 bit app on a 64 bit development computer. On VS 2010 I had to go to Properties/Configuration Manager/New and choose x86. Then I did a clean and rebuild and it ran fine.
I am working with c# windows form application and i am using mysql as backend. i created setup for my project by giving target platform property as x64. when i install my application in windows 7 64bit OS it installed perfectly without error. but when i open the installed application it cant open ,its shows "Windows closing the application". what is the solution for my problem. Eventhough i didnt install mysql driver.
I have another c# windows form application with DirectX without have any backend, this application also have same problem
Thanks in Advance
Here are the diagnosis steps I'd go through:
Check the event log. If the CLR has failed to load your application to start with, there may be something in there.
Try using the Fusion Log Viewer to see what's happening in terms of assembly binding.
Does the MySQL driver you're using have separate 32 and 64 bit DLLs, and are you sure you're installing the right one?
Are you able to test this without going through a full installation (i.e. build and run on a Win7 x64 box without the installer part)?
Does it still fail if you build for "Any CPU"? Or is there some specific reason why you can't do that?
Does it fail if you build for x86, which should still work fine on an x64 box? (Unless you really need to take advantage of lots of memory in your app, there can be some performance benefits to running the x86 CLR, particularly in terms of memory as every reference is half the size.)
If you create a small "test app" which doesn't use MySQL, does that fail?
Can you write a tiny console application which does use MySQL, and make that fail, thus showing a minimal amount of "user" code required to provoke the failure?
Chances are that the source of your problem is that you application is running as a 64 bit process but it has some dependency on a component that is only available in 32 bit. This is not unexpected when you depend on DirectX. MySQL I'm not so sure about.
When you build your project you decide which platform you want to target. You do that in the settings for your project in Visual Studio.
Right click on the project the in solution explorer and select Properties from the menu. It is important that you right-click on the project that creates your application and not for instance a setup project.
On the left side of the window displaying the settings you have some tabs. Select the second tab named Build.
There is list box named Platform target. This is where you determine what platform to target.
You have four choices:
Any CPU: If you choose this your application will run as the "native bitness" of your host operating system. On 64 bit Windows your application will run as 64 bit. Do not select this if you have a dependency on a component that is only available in 32 bit. If that is the case and you select this your application will run fine on 32 bit Windows but will fail on 64 bit Windows. That is the symptom you are experiencing.
x86: If you choose this your application will always run in 32 bit. Select this if you have a dependency on a component that is only available in 32 bit.
x64: If you choose this your application will always run in 64 bit and will refuse to run on 32 bit Windows. That is probably not what you intend.
Itanium: This is for another processor architecture.
I'm working with a C# sample application (taken from here : http://www.piccoder.co.uk/content/view/42/26/1/4/)
The sample app and the source code are available in the .zip file.
When I run the app in Windows XP, it is working correctly.
But the same app, when I run in Windows 7, it is not working correctly. You can try run the WindowsApplication3.exe file in the /bin directory, and try to do the addition of two number there. The result will always be zero (in windows 7)
I've been using Visual Studio 2008 (in my Windows 7 machine) to modify and build the source code, and run the output app in Windows XP machine for testing purposes. I hope I can test it on Windows 7 machine directly. Can someone take a look at the source code and guide me if there were anything to be modified or added since this sample source code is quite an old code.
Thank you!
The problem most probably has nothing to do with C# or the .Net framework. It's likely a failure in the communication with the USB driver. The drivers model has changed drastically between XP and Vista/Win7 and the USB wrapper library most likely assumes the XP driver model.