Skip to content
  • Michael Stürmer's avatar
    VS: Do not reference output assemblies if not possible for CSharp target · 7e57e6ae
    Michael Stürmer authored and Brad King's avatar Brad King committed
    Since commit v3.9.0-rc4~4^2 (Vs: allow CSharp targets to be linked to
    CXX targets, 2017-06-20) 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
    7e57e6ae