Hi,
i have created an application and i want to run this application from a usb. I have copied the exe found in the debug folder to the usb and then i need to connect the usb in another computer . there i need to run the program from usb. Is there any dependency to be added to make sure that the exe run in any computer?

Recommended Answers

All 7 Replies

I dont want to create an installable, but just want to run the exe

You will still need the .Net framework for your executable to run on the target machine. If your executable references any other dlls then you will need to add those too.

You need the .Net framework because the exe you have is not a set of machine code instructions that the machine will automatically know what to do with. The link below tells you in more detail about what you have, see the section comparing java to .Net.
http://en.wikipedia.org/wiki/.NET_Framework.

I have copied the exe found in the debug folder

A little late on my part as the discussion has shifted but it's probably worth noting that you definitely want the Release build exe and not the Debug version as it debug has all of the extra luggage (debug info) inside (and is not optimized).

A little late on my part as the discussion has shifted but it's probably worth noting that you definitely want the Release build exe and not the Debug version as it debug has all of the extra luggage (debug info) inside (and is not optimized).

Thanks for the info,
i am not yet completed with the final layout. Thats why i am still having Debug only in the folder

You will still need the .Net framework for your executable to run on the target machine. If your executable references any other dlls then you will need to add those too.

You need the .Net framework because the exe you have is not a set of machine code instructions that the machine will automatically know what to do with.

If i want to give my application in a usb, which will run when ever the usb is plugged in( using autoexe.bat), what should i do. The link which you gave is mentioning that the .net framework is there in systems like xp2, vista etc. So what i have to do to make sure that my program runs in all machine ....

First off you can't make it work in all machines especially using .Net only those that use Windows operating systems. For other operating systems like Mac OS and Linux you will need different USB device.

If you are only interested in Windows operating systems it depends on what users have installed on their machines. You could run an app or an install script/program to ensure that the correct .Net framework is installed.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.