永远复制到输出目录不起作用 [英] Copy always to output directory does not work

查看:98
本文介绍了永远复制到输出目录不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的控制台项目,我正在读两个Excel文件。 Excel文件包含在项目中(添加现有项目),我已经使用复制到输出目录进行了标记。但是,当调试/运行代码时,它们不会被复制到调试目录。



我觉得我忘了一些小事。我需要做些什么?

解决方案

对非源代码文件的更改不会导致重建 - 它们不要考虑编译器是否过期检查。



尝试通过完全删除输出目录来强制完成重建(有时做这在Visual Studio中是不完整的)。



可能这些文件没有被复制,因为没有运行完整的构建。 p>

I've got a simple console project where I'm reading two Excel-files. The Excel-files are included in the project ("add existing item") and I've marked them with "Copy to Output Directory". However, they are not copied to the debug-directory when debugging/running the code.

I feel like I've forgotten something trivial. What do I need to do more?

解决方案

Changes to non-source code files don't cause a rebuild to occur - they aren't considered when the compiler does it's out of date checking.

Try forcing a complete rebuild by deleting your output directory completely (sometimes doing this from within Visual Studio isn't complete).

It may be that the files haven't been copied across because a full build hasn't been run.

这篇关于永远复制到输出目录不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆