|
| 1 | +<Project> |
| 2 | + |
| 3 | + <!-- |
| 4 | + Accurately reporting the command line arguments requires that the target Restore is run _without_ these values having |
| 5 | + been set. The project file helper associated with this .targets file calls Restore before calling into the target |
| 6 | + that prints the command line arguments. |
| 7 | + --> |
| 8 | + <PropertyGroup Condition="'$(DesignTimeBuild)' == 'true'"> |
| 9 | + <ProvideCommandLineArgs>true</ProvideCommandLineArgs> |
| 10 | + <BuildProjectReferences>false</BuildProjectReferences> |
| 11 | + <SkipCompilerExecution>true</SkipCompilerExecution> |
| 12 | + <DisableRarCache>true</DisableRarCache> |
| 13 | + <AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects> |
| 14 | + <CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory> |
| 15 | + <CopyOutputSymbolsToOutputDirectory>false</CopyOutputSymbolsToOutputDirectory> |
| 16 | + <SkipCopyBuildProduct>true</SkipCopyBuildProduct> |
| 17 | + <AddModules>false</AddModules> |
| 18 | + <UseCommonOutputDirectory>true</UseCommonOutputDirectory> |
| 19 | + <GeneratePackageOnBuild>false</GeneratePackageOnBuild> |
| 20 | + </PropertyGroup> |
| 21 | + |
| 22 | + <!-- displays the target frameworks of a cross-targeted project --> |
| 23 | + <Target Name="_ComputeDependsOn"> |
| 24 | + <!-- |
| 25 | + In a multi-targeted project, the _ComputeTargetFrameworkItems populates the ItemGroup _TargetFramework with the |
| 26 | + appropriate values. If the project contains just a single value for $(TargetFramework) then the target |
| 27 | + _ComputeTargetFrameworkItems doesn't exist, so instead the helper target _PopulateTargetFrameworks is run which |
| 28 | + populates the same group. |
| 29 | + --> |
| 30 | + <PropertyGroup> |
| 31 | + <WorkerDependsOn Condition="'$(TargetFramework)' == ''">_ComputeTargetFrameworkItems</WorkerDependsOn> |
| 32 | + <WorkerDependsOn Condition="'$(TargetFramework)' != ''">_PopulateTargetFrameworks</WorkerDependsOn> |
| 33 | + </PropertyGroup> |
| 34 | + </Target> |
| 35 | + <Target Name="_PopulateTargetFrameworks"> |
| 36 | + <ItemGroup> |
| 37 | + <_TargetFramework Include="$(TargetFramework)" /> |
| 38 | + </ItemGroup> |
| 39 | + </Target> |
| 40 | + <Target Name="_ReportTargetFrameworksWorker" DependsOnTargets="_ComputeDependsOn;$(WorkerDependsOn)"> |
| 41 | + <Message Text="DetectedTargetFramework=%(_TargetFramework.Identity)" Importance="High" /> |
| 42 | + </Target> |
| 43 | + <Target Name="ReportTargetFrameworks" DependsOnTargets="_ComputeDependsOn;_ReportTargetFrameworksWorker"> |
| 44 | + </Target> |
| 45 | + |
| 46 | + <!-- displays the command line arguments passed to fsc.exe --> |
| 47 | + <Target Name="ReportCommandLineArgs" |
| 48 | + DependsOnTargets="Build"> |
| 49 | + <Message Text="DetectedCommandLineArg=%(FscCommandLineArgs.Identity)" Importance="High" /> |
| 50 | + </Target> |
| 51 | + |
| 52 | +</Project> |
0 commit comments