File size: 3,405 Bytes
090629c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<!--

***********************************************************************************************

Microsoft.NET.Sdk.ImportWorkloads.targets



WARNING:  DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have

          created a backup copy.  Incorrect changes to this file will make it

          impossible to load or build your projects from the command-line or the IDE.



Copyright (c) .NET Foundation. All rights reserved.

***********************************************************************************************

-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <!-- Workload support -->

  <!-- Import workload manifests -->
  <Import Project="WorkloadManifest.targets" Sdk="Microsoft.NET.SDK.WorkloadManifestTargetsLocator"/>

  <UsingTask TaskName="ShowMissingWorkloads" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" />

  <Target Name="GetSuggestedWorkloads"

          Returns="@(SuggestedWorkload)"

          Condition="@(MissingWorkloadPack) != ''">
    <ShowMissingWorkloads MissingWorkloadPacks="@(MissingWorkloadPack)"

                          NetCoreRoot="$(NetCoreRoot)"

                          NETCoreSdkVersion="$(NETCoreSdkVersion)"

                          GenerateErrorsForMissingWorkloads="false">
      <Output TaskParameter="SuggestedWorkloads" ItemName="SuggestedWorkload" />
    </ShowMissingWorkloads>
  </Target>

  <!-- Skip this target for design time builds when there are missing workload packs.

       This will prevent design time builds from failing and therefore allow

       Visual Studio to collect the workloads from the GetSuggestedWorkloads target -->
  <Target Name="_CheckForMissingWorkload"

        BeforeTargets="_CheckForInvalidConfigurationAndPlatform;_CheckForUnsupportedTargetPlatformIdentifier"

        Condition="'@(MissingWorkloadPack)' != '' And '$(DesignTimeBuild)' != 'true'">

    <ShowMissingWorkloads MissingWorkloadPacks="@(MissingWorkloadPack)"

                          NetCoreRoot="$(NetCoreRoot)"

                          NETCoreSdkVersion="$(NETCoreSdkVersion)"

                          GenerateErrorsForMissingWorkloads="true"/>
  </Target>

  <!--  This target is not part of the build. Only used by dotnet workload restore command. Global property "SkipResolvePackageAssets"

        need to be set to "true" to avoid requiring restore (which would likely fail if the required workloads aren't already installed).-->
  <Target Name="_GetRequiredWorkloads" DependsOnTargets="GetSuggestedWorkloads;PrepareProjectReferences" Returns="@(_ResolvedSuggestedWorkload)">
    <MSBuild

      Projects="@(_MSBuildProjectReferenceExistent)"

      Targets="_GetRequiredWorkloads"

      BuildInParallel="$(BuildInParallel)"

      Condition="'%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true' and '@(_MSBuildProjectReferenceExistent)' != ''"

      RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)$(_GlobalPropertiesToRemoveFromProjectReferences);TargetFramework;TargetFrameworks">
      <Output TaskParameter="TargetOutputs" ItemName="SuggestedWorkloadFromReference"/>
    </MSBuild>

    <ItemGroup>
      <_ResolvedSuggestedWorkload Include="@(SuggestedWorkload)"/>
      <_ResolvedSuggestedWorkload Include="@(SuggestedWorkloadFromReference)"/>
    </ItemGroup>

  </Target>
</Project>