Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Add Console App as Reference

I would like to add a console app as a reference to an asp.net project. Ideally I want them in the /bin folder (or in a sub folder in the web/output folder). Unfortunately, adding the console app as a reference will put the build output in /bin of the web project, but it will not generate the App.config file.

Does anyone know the proper way to include a console app in the build/publish process of an asp.net project?

Thank you,

like image 317
herme 0 Avatar asked Oct 11 '25 20:10

herme 0


1 Answers

Adding it as a reference will affect compilation, which is not what you want.

Instead, you should add a build step (to either project) to copy the EXE & config file to a directory of your choice.

You should also edit the solution to add the EXE as a dependency of the web project to make sure it builds first.

like image 156
SLaks Avatar answered Oct 14 '25 10:10

SLaks