Reputation: 609
I want to add post-build events to a project, elegantly. I wrote them in batch first, but there's a little logic in them, so I thought it might be best to write them in a more readable language. The project is free open-source, so I want it to build in Visual C# Express 2010 and SharpDevelop as well as VS2010, and avoid third-party software.
I found MSBuild Inline Tasks, which might serve this purpose. I figure it would be more intuitive to other developers if the build tasks were a file in the project (instead of in the project file), and apparently there is a way to do this, but I haven't found any good resources on it.
Can we get an easy-reference Post-Build template here, and/or other post-build resources?
Upvotes: 4
Views: 1098
Reputation: 609
I went ahead and left the post build event in batch form, but I moved the code into a batch file so I could use a better text-editor with syntax highlighting.
You can also use a scripting language like CS-Script this way, which I'll probably do later. It does require 3rd party software, but you can write the build event in C# with full syntax highlighting and code completion features.
Upvotes: 1