We have a project with included win32 dll as content file. This file (native32.dll) is copied to the output directory and imported at runtime. Visual studio compiles project without any problems, however TeamCity takes this .dll file (or any .dll file included in the project structure) and treats it as if it was a reference:
csc.exe <..> /reference:native32.dll <..>
Build fails with error:
CSC error CS0009: Metadata file 'native32.dll' could not be opened -- PE image doesn't contain managed metadata
How can this native32.dll be excluded from being referenced?