简体   繁体   English

如何管理在VS C#Express中发布和构建的常用文件?

[英]How to manage files common to release and build in VS C# Express?

I have a C# Console app in VS C# Express 2008. The program needs to read a few files at runtime, which I would like to place in the same directory as the .EXE for convenience. 我在VS C#Express 2008中有一个C#控制台应用程序。该程序需要在运行时读取一些文件,为了方便起见,我希望将它们放置在与.EXE相同的目录中。 But of course there are two .EXEs, one debug and one release, and I don't want to copies of everything. 但是,当然有两个.EXE,一个是调试版本,另一个是发行版本,我不想复制所有内容。 What's the best way to manage this? 最好的管理方式是什么?

You could just change the output path of both configurations to use just 'bin\\'. 您可以将两种配置的输出路径都更改为仅使用“ bin \\”。

-- or -- - 要么 -

You could add the files to the project, right-click, and set "Copy to Output Directory" to "Always" 您可以将文件添加到项目中,单击鼠标右键,然后将“复制到输出目录”设置为“始终”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM