dotnet / dotnet/msbuild

Unable to publish C# project with C++ dependencies

Open
#5,968 11 comments 1 reaction 0 assignees View on GitHub
triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

### Issue Description

We have a C# project, say `ProjectA`, using SDK project file format and targeting .NET Framework 4.7.1. This project depends on a VC10 C++/CLI project (`ProjectB`) which depends on VC10 C++ project (`ProjectC`): `ProjectA [net471] <- ProjectB [VC10 C++/CLI] <- ProjectC [VC10 C++]` (where A <- B means that A depends on B).
We are trying to publish the C# entry project, `ProjectA`, using `Publish` target from MSBuild (`msbuild /t:Publish`)

### Steps to Reproduce

Please reproduce the dependency graph mentioned above.

### Expected Behavior
The publish directory should contain all the dependencies of `ProjectA`, recursively.

### Actual Behavior
The resulting directory contains `ProjectA.dll`, `ProjectB.dll` but **not** `ProjectC.dll`.
In general, the `Publish` target is not able to resolve C++ dependencies recursively.

Is this behavior expected? Is there anything we can do about this please?
~~Could upgrading C++ to v142 help?~~ Could migrating `ProjectC` to C++/CLI help?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.