Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# console app deployment

Tags:

c#

deployment

I have a simple C# console application developed on my local machine using VS2008 Pro. I want to know how to deploy this solution onto a network share folder?

A similar Java console program is already placed (as a JAR file) in the same network share folder. Users simply open command prompt, navigate to shared folder and type "java -jar programName.jar inputParameter1 inputParameter2"

How can I achieve the same with .NET?

like image 531
DRags Avatar asked Dec 31 '25 18:12

DRags


2 Answers

You can copy the exe over yourself, go to the bin folder in the directory your source code is in and copy it there.

or you can click the BUILD menu and use the PUBLISH menu item. This will allow you to enter the path to your network share and visual studio will copy the built app to the folder for you.

like image 62
Glenn Avatar answered Jan 03 '26 12:01

Glenn


If your application is really "simple", you should be able to just copy the files to a shared folder and run it from there. However, if your "simple" application tries to do things that are restricted by the permissions you might have to configure them with caspol. Assemblies loaded from a shared drive have much fewer permissions than the ones loaded from a local drive.

like image 35
Otávio Décio Avatar answered Jan 03 '26 13:01

Otávio Décio



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!