microsoft / microsoft/MSBuildSdks
IncludeBuildOutput = false causes some issues
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 508
- Forks
- 94
- Avg merge
- 6h 40m
- Merged PRs (30d)
- 2
Description
I use a NoTargets project to generate a NuGet package that contains multiple different ProjectReference's build output. So, the generated nupkg has multiple files in lib/tfm. Seems a typical pattern.
NoTargets sets IncludeBuildOutput to false for obvious reasons: NoTargets projects don't have their own build output.
However, IncludeBuildOutput is used elsewhere in the SDK code. It is also used during pack in _WalkEachTargetFramework to determine whether or not to invoke $(TargetsForTfmSpecificBuildOutput) and $(TargetsForTfmSpecificDebugSymbolsInPackages). These two properties are generally used to do what I'm trying to do: include the build output of ProjectReferences into the Nuget package.
I haven't found anything wrong with setting IncludeBuildOutput to true. It doesn't break because of the missing primary output.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the pack logic around _WalkEachTargetFramework and how IncludeBuildOutput controls TargetsForTfmSpecificBuildOutput and TargetsForTfmSpecificDebugSymbolsInPackages. Reproduce the issue with a NoTargets project and multiple ProjectReferences, then verify that the generated NuGet package contains their outputs without requiring a primary build output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100