문제

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?

도움이 되었습니까?

해결책

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.

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top