开发者

VS2010: Creating Post-Build Events (C#)

开发者 https://www.devze.com 2023-03-05 17:22 出处:网络
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

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), an开发者_运维知识库d 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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消