This repository has been archived by the owner on Jan 12, 2024. It is now read-only.
Fixed targets not imported during multitargeting #154
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
buildMultiTargeting\NuGet.Build.Packaging.MultiTargeting.targets
file was not imported into msbuild script during multi-target phase, due to the name not matching the package id.Related to NuGet/Home#6277
Changed
buildMultiTargeting\NuGet.Build.Packaging.MultiTargeting.targets
to
buildMultiTargeting\NuGet.Build.Packaging.targets
,removing the MultiTargeting part from the file name.
The issue is demonstrated and can be tested with the repo
https://github.com/ChristophLindemann/NuGet.Build.Packaging.MultiTargeting.Test
This is only a partial fix! The files are now correctly imported, but it fails with
error NG0012: Duplicate package source files with distinct content detected. Duplicates are not allowed in the package. Please remove the conflict between these files...
due to package content from referenced multitarget projects are imported multiple times.I guess when resolving references, it should take into account the targetframework and only resolve those which are matching.
Maybe @kzu has some input on where/how to solve?
This problem can also be seen with the NuGet.Build.Packaging.MultiTargeting.Test repo after upgrading to a new version of
NuGet.Build.Packaging
with the fixed buildMultiTargeting stuff.