Fix missing targets file issue in some C++ nuget packages #2025
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.
What does this PR do?
Projects using the C++ nuget package import the targets file
packages\\{package_id}.{version}\\build\\native\\{package_id}.targets
is imported,but there are some packages that have
.targets
files in other locations or need to import.props
files other than.targets
.Example.
The targets file for the WinPixEventRuntime package targets file exists in
packages\WinPixEventRuntime.1.0.220810001\build\WinPixEventRuntime.targets
. notpackages\WinPixEventRuntime.1.0.220810001\build\native\WinPixEventRuntime.targets
.Microsoft.Direct3D.D3D12 package needs to import
packages\Microsoft.Direct3D.D3D12.1.608.2\build\native\Microsoft.Direct3D.D3D12.props
file as well aspackages\Microsoft.Direct3D.D3D12.1.608.2\build\native\Microsoft.Direct3D.D3D12.targets
file.How does this PR change Premake's behavior?
packageAPIInfo.packageEntries
variable for package nuget even when it is not a C# project.props
and.targets
files in thepackageAPIInfo.packageEntries
variable and import them.Anything else we should know?
May slow down project generation to search for targets and props files.
Closes #1497
Did you check all the boxes?
closes #XXXX
in comment to auto-close issue when PR is merged)You can now support Premake on our OpenCollective. Your contributions help us spend more time responding to requests like these!