how to make an executable version of a WPF Kinect Application? - c#

I have made a Kinect Application in Microsoft Visual Studio 2010. I need to make an exe of the application which can run on any windows based system. If I need to do that than is there any requirements that the system should fulfil? and If yes, then how do I do that?
I tried to use the exe in application/bin/debug/application.exe by copying it in another folder but it shows an error but if I run the exe from the bin/debug/application.exe it works. Am I missing something here or is it the only way to do that?

"Any Windows based system" isn't going to work. Assuming you're using the Kinect SDK, it will only run on Windows 7 (and supposedly Windows Server 2008). The computer running the application will need either the Kinect Runtime, which only works with the new Kinect for Windows sensor, or the Kinect SDK, which also works with the Kinect for Xbox. Microsoft wants to sell more Kinect for Windows sensors, so they don't allow the runtime to work with the old Xbox Kinects. Makes sense in a way, but man that bugged me when I first found out about it. There's a short post showing how to test for the existence of the Runtime on application load, so you can show an appropriate error message instead of just crashing out.
You need to copy any files that the program relies on, such as DLL files, along with the executable. There's instructions here for how to embed the DLL files into the executable; I've not tried it but it might be worth a shot.
The correct .NET version should be installed when either the Runtime or the SDK is installed; you shouldn't have to worry about this.

#Coeeffect is right, but you can also publish version 1.0.0.0 of your app by going to project -> properties -> publish -> publishing wizard to publish your application to then use on ther computes ect. Hope this helps!

You need to copy all non-standard DLLs that your program uses.
The target computer needs the appropriate version of .Net.

Related

How to fix "System.Management is supported on Windows Desktop Apps only" Exception

The Issue:
Our application is a .NET 5 Windows Desktop application. The licensing capability requires the application to use the System.Management component from NuGet to create a unique device ID from the system processor ID, MAC Address and BIOS serial number.
This all worked great when testing it from Visual Studio debugger. However, when adding System.Management.dll to the application installer (InstallShield installer) I naturally selected the version of System.Management.dll that was in the app's build target folder. It turns out that the version of the DLL that ends up in that folder is a no-op version that throws not supported exceptions saying "System.Management is supported on Windows Desktop Apps only".
The Solution:
I found the correct version of System.Management.dll in the build TargetFolder\runtimes\win\lib\netcoreappX.x folder. In my case, since I'm using System.Management version 6.0, it is in the "netcoreapp3.1" folder.
Conclusion
There are many cases where Microsoft doesn't do the right thing. In this case, my application was specifically a .NET 5 Windows Desktop application, so we would all think that msbuild could figure out the correct thing to do. Not so. In such a case, I would have at least hoped that .NET Foundation would have provided information on this. Well, now you all know now, as well!
Cheers

Why won't my program open on Pocket PC?

I am making a program in Visual Studio 2008 for my Pocket PC, but I can't get the program to open. I followed the instructions to create a cab file to install it on the device, but then when I try to click on the program its loads for half a second and then doesn't do anything. The program works fine in the emulator.
Are you really using a Pocket PC device? The Pocket PC terminology was last used in 2003. The platform has been called "Windows Mobile" since then. Not to be confused with "Windows 10 Mobile". Naming is not a strong point for Microsoft in this regard.
You need to use the Pocket PC SDK if you are truly developing for a Pocket PC.
If your application uses MFC then your program will depend on the MFC library to run. The simplest way to solve this problem is to link statically to MFC.
Go to the Project Settings
Go to the "General" tag page.
Search for "Use of MFC" and select "Use MFC in a static library".
Save & Rebuild the project. The size of your EXE is now larger because you have statically linked to MFC.
If your application uses Compact Framework then your program will also depend on the .NET Compact Framework (CF) library to run. The simplest way to solve this problem is to include the CAB file(s) from your Visual Studio folder. Then you can run the CAB file to install .NET Compact Framework.
Navigate to the "C:\Program Files (x86)\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\wce400\armv4" folder.
Copy the "NETCFv2.ppc.armv4.cab" file to your device.
On the device, navigate to the NETCFv2.ppc.armv4.cab file and click on it to install.
You can read this for more information on the subject.

run c sharp program without installing in client machine

I want to run an application in client machine without installing it in the client machine. the application file should be in my usb pen drive and when I go to customer pen is plug in client machine and run the application. The system is developed by c#. Please send any ideas.
Build it in .Net framework 2. Then you can run it in almost all the windows machine except windows 8. .Net framework 2 is disabled by default in windows 8. You can enable it and run your app. Framework 2 will be available when installing windows and can run by double clicking the exe
If you are just interested in running the C# program, there are various online C# compiler available. For eg:
http://www.compileonline.com/compile_csharp_online.php
http://ideone.com/
If it is an application in .exe, you should be able to run it in windows without installing anything, as Windows already contains a version of .Net by default.
If you just have the dlls, scripts etc, you are in deep trouble.
It sounds as if you're after a linker/merger/virtualizer. I don't have any experience with these tools but they are cited quite often:
Xenocode
Thinstall
ILmerge
Salamander
SkaterPro
Spoon Studio

Xamarin C# Cross Platform Application

I am new to using Xamarin and have always used Visual Studio, however I now require to develop a desktop application which will run on both Mac and Windows, OR at least a package which will let me package for both.
I have created a GTK 2.0 Project, connected to a MySQL database etc and all is fine, however I can only see options to create a .exe and no .dmg file for OS X but the debugger lets me run it on my Mac.
Does anyone have any ideas or pointers?
We use Xamarin.Mac to enable us to develop a Windows and Mac client using c#.
We chose to re-build the core code in Xamarin Studio and use interfaces to abstract the OS dependent code.
We share 90% of our code in the Xamarin.Mac/VS solutions.
Do let me know if I'm helping... if so I can provide more detail if need be.
Check the following link on how to create an .app bundle with Xamarin:
How to set Xamarin MonoMac project so its build outputs .app package instead of .exe?
An app bundle is basically a special kind of folder structure that contains all app data, including e.g. graphical resources, configuration files, localisations, etc...
A .dmg file is used for distribution and can be created using other tools like Apple's own Disk Utility, once you've created the app.

how to run a winform Exe in normal Pc not having .net frame work installed

I developed a winform application using C# in visual studio 2008. Now i want to run the exe on another PC which doesn't have .net framework or Visual Studio. I am sending the application using Zip via email. The second PC downloads that application and extracts into a normal folder and then it executes the exe file.
But i am getting the exception that .net frame work v 2.0 must be installed.
Can you please tell me how to run that exe without .net frame work installed?
(Amended for #Merhdad's sanity :-))
The short answer: You can. You shouldn't.
The long answer: You could technically create your own unmanaged bootstrapper that goes and download the .NET client profile redist and silently installs it using the MSI APIs, and then loads the CLR and hosts it in the process in order to execute the managed code, after which it silently uninstalls the .NET Framework from the machine.
The Disclaimer: I know few people that could pull that off. They would be the first to tell you not to do it.
The alternative hack answer: You can also use one of the tools #Mehrdad mentioned. i can't comment whether they work or not. However, you should be aware that this leaves your app linked to a specific snapshot of the .Net framework code, and for every security update you need to take, yuo have to relink and release an update of your application as well.
The alternative open source answer: You could ensure your WinForms app builds and runs on Mono, and deploy Mono side-by-side with the app. I've heard it supports that scenario.
The alternative IT answer: You could create a VM appliance with stripped down Window image that has .Net and your app only, and ship it as a single executable.
The right answer: Create an installer for your app that installs the .NET Framework for your customers.
Yes! You can do this with a variety of programs, and Spoon seems to be among the most up-to-date ones.
(Of course, this doesn't mean that you should, just that you can.)
This cannot be done. You must have the .NET Framework in order to run the application.
I solved the problem.I added a package in visual studio.I added Setup and deployment as a new project to my solution.later i added exe to that package.so if client machine runs the setup it'l create exe and can run the application successfully.
yeah,you can do that by converting your whole application to an installer.just check it out, it will helps u a lot
http://www.youtube.com/watch?v=PCnfGUT-K-4

Categories

Resources