我怀疑“复制本地”是一个MSBuild功能,而不是编译器功能。如果你看一下csc
命令行:
- INPUT FILES -
/recurse:<wildcard> Include all files in the current directory and
subdirectories according to the wildcard
specifications
/reference:<alias>=<file> Reference metadata from the specified assembly
file using the given alias (Short form: /r)
/reference:<file list> Reference metadata from the specified assembly
files (Short form: /r)
/addmodule:<file list> Link the specified modules into this assembly
/link:<file list> Embed metadata from the specified interop
assembly files (Short form: /l)
/analyzer:<file list> Run the analyzers from this assembly
(Short form: /a)
/additionalfile:<file list> Additional files that don't directly affect code
generation but may be used by analyzers for produ
cing
errors or warnings.
你可以做/reference:<alias>=<file>
得到一个别名,或/link:<file list>
嵌入互操作的元数据,但没有选择这里“复制本地”。
您必须自己执行复制。