我的 C# VS2010 项目的文件夹中有一个文件标记为Content
and Always Copy
.
当我更改此文件并将其保存到 VS 外部,然后运行该项目时,修改后的文件不会复制到输出中。如果我重建,那就是。我的猜测是VS不会使用文件的修改日期时间戳来确定是否应该复制它。
我错过了什么吗?这让我抓狂,因为我每跑就要损失 5 分钟。
谢谢你!
Hard to explain so start by getting better diagnostics. Tools + Options, Projects and Solutions, Build and Run settings. Change the "MSBuild project build output verbosity" setting to Normal. In that same property page, ensure that the "On Run, when projects are out of date" setting is set to Always build. Look in the Output window when you press F5 or Build + Build, the _CopyOutOfDateSourceItemsToOutputDirectory task is the one that copies the file.
使用“项目”+“添加现有项”时可能出现的一个陷阱:IDE 会为您选择的文件创建一个副本。您可能正在更改原始文件而不是项目目录中的副本。您可以通过单击对话框中“添加”按钮上的箭头并选择“添加为链接”来解决此问题。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)