Skip to content

VS: Do not reference output assemblies if not possible for CSharp target

Since commit !993 (merged) CSharp targets get ProjectReference entries to their dependencies. This causes VS to also reference the dependency's output assembly by default, which is incorrect for non-managed targets.

Fix this by setting ReferenceOutputAssembly to false for targets that can't provide output assemblies. Unmanaged C++ targets (shared libs & executables) can still be referenced and a warning will be shown in the IDE but the build will not break anymore.

Fixes: #17172 (closed)
Topic-rename: vs-csharp-ref-no-asm

Edited by Brad King

Merge request reports