Skip to content

Commit 077780d

Browse files
Merge pull request #1344 from ericstj/packageValidation
Make GetTargetPath return valid path for nupkgprojs
2 parents fdf4862 + bb32b64 commit 077780d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pkg/Directory.Build.targets

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,13 @@
55
<EnablePackageValidation>true</EnablePackageValidation>
66
<PackageValidationBaselineVersion>$(PreviousPackageVersion)</PackageValidationBaselineVersion>
77
</PropertyGroup>
8+
9+
<Target Name="GetTargetPath" Returns="@(_updatedTargetPath)">
10+
<!-- Repoint up the TargetPath to represent the a matching file from PackagePreparationPath if it exists, otherwise don't return a target path
11+
This fakes what the project output would be if we were using real projects (and not package projects) to represent these libraries. -->
12+
<ItemGroup>
13+
<_targetPathUnderPackagePrep Include="@(TargetPathWithTargetPlatformMoniker->'$(PackagePreparationPath)$(PackageIdFolderName)\lib\$(TargetFramework)\%(FileName)%(Extension)')" />
14+
<_updatedTargetPath Include="@(_targetPathUnderPackagePrep)" Condition="Exists('%(Identity)')" />
15+
</ItemGroup>
16+
</Target>
817
</Project>

0 commit comments

Comments
 (0)