dotnet / dotnet/project-system
Build & Run - only one TFM in multi-target project
- Dominant language
- C#
- Stars
- 1k
- Forks
- 415
- PR merge metrics
- No merged PRs in 30d
Description
_Copied from original issue https://github.com/Microsoft/msbuild/issues/1818 posted by @onovotny_
When making changes to multi-targeted libraries, the project system/MSBuild has to rebuild all TFM's as part of the build graph. This is not necessary if I want to run an app on a particular TFM. The build system should only build the necessary closest TFM.
Concrete example:
- .NET 4.6 exe references multi-targeted library with net45 and netstandard1.4 outputs (there may be many more).
- Change is made in the library
- User hits F5 to debug/run the app.
**Actual results**
The library is built twice, once per TFM
**Expected results**
Library is built once
Note, if I just build the library or the sln, it should build all. This is an optimization for when I build a specific library/app/output that depends on another one and it knows which one it needs.
Contributor guide
Assessment
This issue has not been assessed yet.