Question

I have a .net console application that takes a filename as an argument, and then processes the file with some actions. What do I need to do to be able to allow a user to run my console app with the param from anywhere on the network? Do I have to install it on every machine I want it to run on, or can I just copy the .exe from the bin folder, and run it by windows cmd line? Will I need a runtime or anything for it to function properly?

Was it helpful?

Solution

AFAIK, there are two prerequisites to consider:

  1. On the machine executing the exe, the proper version of the .NET Framework must be installed.
  2. The environment must be configured to execute assemblies from network locations. If you're using .NET 4 or above, it should be enough to set the loadFromRemoteSources config entry as described in several places on the web, e.g. in Rick Strahl's blog post. You can find more information on the MSDN-Page for this topic.

OTHER TIPS

you can put your EXE on a network so that everybody can refer to it from one place. also, the callers may need to have the right .NET framework for your EXE to run.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top