Click here to Skip to main content
15,904,153 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi experts,

I have some block of c# code which i want to run during build process of the project.
I there any event in dot net which can be fired during build process?
Or Is there any other way to run the code during build process.

thanks in advance
Keerthi Kumar
Posted

1 solution

Yes, you can, but this is not about event. It's about MSBuild declarative language which defines incremental build with dependencies and time stamps. You can create custom projects using custom Tasks, conforming to the MSBuild standard. C# is quite suitable for programming such tasks. Essentially, this is a .NET class library assembly using MSBuild API.

Please start here:
https://msdn.microsoft.com/en-us/library/dd393574.aspx[^],
https://msdn.microsoft.com/en-us/library/dd637714.aspx[^],
https://msdn.microsoft.com/en-us/library/ms171466.aspx[^],
https://msdn.microsoft.com/en-us/library/t9883dzc.aspx[^].

See also my comment to Solution 1.

—SA
 
Share this answer
 
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900