在Visual Studio项目中管理XML文件(2个实例)

时间:2022-11-08 19:00:03

Managing XML files in a Visual Studio project (2 instances)

在Visual Studio项目中管理XML文件(2个实例)

If I add an XML file to my VS project it at the root level of the project with the source files. But then if I want to test or build I need a copy down in the bin directory. Of course I always end up editing the one at the root level that is in VS and then I go to test and am using a different file (one in the bin directory).

如果我将一个XML文件添加到我的VS项目的源项目的源项目。但是如果我想测试或构建,我需要在bin目录中下载副本。当然,我总是最后编辑VS中的根级别的那个,然后我去测试并使用不同的文件(bin目录中的一个)。

Is there a good way to either point the file being edited to the bin file or to always copy when I go to debug (or some other good solution)?

是否有一种很好的方法可以将正在编辑的文件指向bin文件,或者在我进行调试时总是复制(或其他一些好的解决方案)?

1 个解决方案

#1


On the properties pane when you have the file selected, choose "Always copy" (or whatever it is) for the Copy to Output Directory setting.

选择文件后,在属性窗格中,为“复制到输出目录”设置选择“始终复制”(或其他任何内容)。

#1


On the properties pane when you have the file selected, choose "Always copy" (or whatever it is) for the Copy to Output Directory setting.

选择文件后,在属性窗格中,为“复制到输出目录”设置选择“始终复制”(或其他任何内容)。