|
19 | 19 | <SatelliteResourceLanguages>en</SatelliteResourceLanguages> |
20 | 20 | <IsPackable>true</IsPackable> |
21 | 21 | <PackAsTool>true</PackAsTool> |
| 22 | + <PublishTrimmed>true</PublishTrimmed> |
| 23 | + <PublishSingleFile>true</PublishSingleFile> |
| 24 | + <PublishSelfContained>true</PublishSelfContained> |
| 25 | + <DebugType>embedded</DebugType> |
22 | 26 | </PropertyGroup> |
23 | 27 | <ItemGroup> |
24 | 28 | <None |
|
83 | 87 |
|
84 | 88 | <Target Name="BuildAllStandloneApplications"> |
85 | 89 | <ItemGroup> |
| 90 | + <!-- Make MSBuild Items out of the RIDs so we can batch across them --> |
86 | 91 | <_RIDS Include="$(RuntimeIdentifiers)" /> |
| 92 | + <!-- Make MSBuild Items out of the TFMs so we can batch across them. Create NUM_RIDS items |
| 93 | + per-TFM because we want to build each TFM for all supported platforms. --> |
| 94 | + <_TFMS |
| 95 | + Include="$(TargetFrameworks)" |
| 96 | + RID="%(_RIDS.Identity)" /> |
| 97 | + <!-- Turn the _TFMS items into requests to build this project (fsautocomplete.fsproj) with |
| 98 | + different parameters. This pattern is often used to to parallel builds of the same project in |
| 99 | + MSBuild logic. --> |
87 | 100 | <_RIDSpecificFSACBuild |
88 | 101 | Include="$(MSBuildThisFile)" |
89 | | - AdditionalProperties="RuntimeIdentifier=%(_RIDS.Identity)" /> |
| 102 | + AdditionalProperties="RuntimeIdentifier=%(_TFMS.RID);TargetFramework=%(_TFMS.Identity)" /> |
90 | 103 | </ItemGroup> |
91 | 104 |
|
| 105 | + <!-- Ask MSBuild to build all of the requests we just made. The MSBuild Task recognizes the |
| 106 | + AdditionalProperties metadata and will apply that to each specific build, we can specify the things |
| 107 | + that are common to all of the builds here. Unsetting RuntimeIdentifiers and TargetFrameworks |
| 108 | + ensures that the SDK targets detect that these are single-RID/single-TFM builds accurately, and |
| 109 | + since we're pretty certain there are no data dependencies here we can have the builds operate in |
| 110 | + parallel. --> |
92 | 111 | <MSBuild |
93 | 112 | Projects="@(_RIDSpecificFSACBuild)" |
94 | 113 | Targets="Publish" |
95 | | - Properties="Configuration=Release;PublishSingleFile=true;PublishTrimmed=true;" |
96 | | - RemoveProperties="RuntimeIdentifiers" |
| 114 | + Properties="Configuration=Release;SelfContained=true" |
| 115 | + RemoveProperties="RuntimeIdentifiers;TargetFrameworks" |
97 | 116 | BuildInParallel="true" /> |
98 | 117 | </Target> |
99 | 118 |
|
|
0 commit comments