Skip to content

Commit fa85391

Browse files
authored
Add PRI generation support for C++ libraries (#1442)
* Add PRI gen support for libraries. * Fix mistake. After fix, verified correct. * Address feedback. Remove unnecessary .NET line. It's not true that TPI is UAP for .NET version less than 5.0. Yes, we require .NET 5 or greater for WAS, but there is no need to have a check here. * Modified change per feedback.
1 parent 3766090 commit fa85391

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

dev/MRTCore/packaging/MrtCore.PriGen.targets

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="15.0">
33

4-
<!-- With .NET 5 and above, the propery TargetPlatformIdentifier is not UAP but rather Windows.
5-
Likewise, for other console apps, TargetPlatformIdentifier is Windows.
6-
PRI generation in VS apps was developed for UWPs originally. Some of the binaries involved assume
4+
<!-- PRI generation in VS apps was developed for UWPs originally. Some of the binaries involved assume
75
that the app is a UWP. Change the value provided to said binaries to UAP. -->
86
<PropertyGroup>
9-
<TargetPlatformIdentifierAdjusted>$(TargetPlatformIdentifier)</TargetPlatformIdentifierAdjusted>
10-
11-
<!-- Any .NET 5 or greater version is valid here! -->
12-
<TargetPlatformIdentifierAdjusted Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '5.0'))">UAP</TargetPlatformIdentifierAdjusted>
13-
14-
<!-- Add support for console apps. -->
15-
<TargetPlatformIdentifierAdjusted Condition="'$(OutputType)' == 'Exe'">UAP</TargetPlatformIdentifierAdjusted>
7+
<TargetPlatformIdentifierAdjusted>UAP</TargetPlatformIdentifierAdjusted>
168
</PropertyGroup>
179

1810
<!-- The win32 project system adds all images in the project to the Image array in the project file.

0 commit comments

Comments
 (0)