USS-Montana
USS-Montana

Reputation: 417

.NET execute a ConsoleApplication before build (including its assembly) from within the same solution

Scenario:

The problem, ConsoleApplication must be built to generate it's assembly (.exe) in order to basically , run..

other projects are dependent on the generated files from the ConsoleApplication, is it possible to execute the console application on a pre build event or some other creative solution before building the rest of the projects?

if so, would be nice to have some information regarding that

Thanks in advance

Upvotes: 0

Views: 48

Answers (1)

Sylence
Sylence

Reputation: 3073

Add a Post-Build step to your ConsoleApplication that executes the application and change the build order so that the ConsoleApplication is build first.

The Post-Build step would simply contain a $(TargetPath) and to change the build order right click on your solution and select Project Build Order... Here for every other project in the solution you set ConsoleApplication as a dependency

Upvotes: 5

Related Questions