开发者

Including non-code in VS project

So I've got several p开发者_Go百科rojects in a solution. A couple of class librarys, a UI, and several testing projects.

There is a set of XML files that are used to store alot of configuration information that we need to init our app.

I want to have one place that is THE xml files and then copy that set of XML into the different projects when they get built. Does anyone know what best practices might address this issue? A tutorial or blog post would be great.

Thanks


You can use Build event command lines (Project / Properties / Build Events) to copy the XML from the source to the project directory before (or after) compilation.


You can place the files in a directory along side your projects. E.g \lib Then in the post build step for the individual projects. E.g. xcopy ..\lib\file1.xml ($OutputDir)


Something like this might do it.


What revision control are you using? It's possible to set the xml files up, version them and then set them up as dependencies for your repository as well. This way when you check out the new project, the new dependencies (unless ignored) will be pulled down with the project.


On second thought, it looks like you're looking to copy them in at build, thus that wouldn't be ideal for you. Though I would imagine you could add a build event to export from the repository so you're always grabbing the latest copy?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜