Welcome to mirror list, hosted at ThFree Co, Russian Federation.

CodeGen.proj « eng - github.com/dotnet/aspnetcore.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f33b29e8d07d97873536249800b776866ff26638 (plain)
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<Project>
  <PropertyGroup>
    <BuildManaged>true</BuildManaged>
    <RepoRoot
        Condition=" '$(RepoRoot)' == '' OR !HasTrailingSlash('$(RepoRoot)') ">$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', '..'))</RepoRoot>
    <BuildMainlyReferenceProviders>true</BuildMainlyReferenceProviders>
  </PropertyGroup>

  <Import Project="Build.props" />

  <Target Name="GenerateProjectList">
    <Message Importance="High" Text="Analyzing @(ProjectToBuild->Count()) projects" />

    <MSBuild Projects="@(ProjectToBuild)"
             Targets="GetReferencesProvided"
             BuildInParallel="true"
             SkipNonexistentTargets="true"
             SkipNonexistentProjects="true">
      <Output TaskParameter="TargetOutputs" ItemName="_ProvidesReferenceOrRequiresDelay" />
    </MSBuild>

    <ItemGroup>
      <_ProjectReferenceProvider Include="@(_ProvidesReferenceOrRequiresDelay->WithMetadataValue('IsProjectReferenceProvider','true')->Distinct())" />
      <_RequiresDelayedBuild Include="@(_ProvidesReferenceOrRequiresDelay->WithMetadataValue('RequiresDelayedBuild','true')->Distinct())" />
      <_SharedFrameworkAndPackageRef Include="@(_ProjectReferenceProvider->WithMetadataValue('IsAspNetCoreApp','true')->WithMetadataValue('IsPackable', 'true'))" />
      <_SharedFrameworkRef Include="@(_ProjectReferenceProvider->WithMetadataValue('IsAspNetCoreApp','true')->WithMetadataValue('IsPackable', 'false'))" />
      <_TrimmableProject Include="@(_ProjectReferenceProvider->WithMetadataValue('IsTrimmable', 'true'))" />
    </ItemGroup>

    <PropertyGroup>
      <ProjectListFile>$(MSBuildThisFileDirectory)ProjectReferences.props</ProjectListFile>
      <ProjectListContent><![CDATA[<!--
  This file is automatically generated. Run `./eng/scripts/GenerateProjectList.ps1` to update.

  This file contains a map of assembly names to the projects that build them.
-->
<Project>
  <ItemGroup>
    @(_ProjectReferenceProvider->'<ProjectReferenceProvider Include="%(Identity)" ProjectPath="%24(RepoRoot)%(ProjectFileRelativePath)" />', '%0A    ')
  </ItemGroup>
</Project>
]]></ProjectListContent>
    </PropertyGroup>

    <!-- Workaround https://github.com/Microsoft/msbuild/issues/1024 -->
    <WriteLinesToFile Condition="'$(OS)' == 'Windows_NT'"
                      File="$(ProjectListFile)" Lines="$([MSBuild]::Escape($(ProjectListContent)))" Overwrite="true" />
    <Exec Condition="'$(OS)' != 'Windows_NT'"
          Command="echo '$(ProjectListContent.Replace('\t','\\t'))' > $(ProjectListFile)" />
    <Message Importance="High" Text="Generated $(ProjectListFile)" />

    <PropertyGroup>
      <SharedFxDepList>$(MSBuildThisFileDirectory)SharedFramework.Local.props</SharedFxDepList>
      <SharedFxDepListContent>
      <![CDATA[
<!--
  This file is automatically generated. Run `./eng/scripts/GenerateProjectList.ps1` to update.

  This file contains a complete list of the assemblies which are part of the shared framework.

  This file is generated using the <IsAspNetCoreApp/> and <IsPackable/> properties from each .csproj in this repository.
-->
<Project>
  <ItemGroup>
    <!-- These assemblies are available as both a NuGet package and in the shared framework -->
    @(_SharedFrameworkAndPackageRef->'<AspNetCoreAppReferenceAndPackage Include="%(Identity)" />', '%0A    ')

    <!-- These assemblies are only in the shared framework -->
    @(_SharedFrameworkRef->'<AspNetCoreAppReference Include="%(Identity)" />', '%0A    ')
  </ItemGroup>
</Project>
      ]]>
      </SharedFxDepListContent>
    </PropertyGroup>

    <WriteLinesToFile File="$(SharedFxDepList)" Lines="$(SharedFxDepListContent)" Overwrite="true" />
    <Message Importance="High" Text="Generated $(SharedFxDepList)" />

    <PropertyGroup>
      <TrimmableProjectsList>$(MSBuildThisFileDirectory)TrimmableProjects.props</TrimmableProjectsList>
      <TrimmableProjectsListContent>
      <![CDATA[
<!--
  This file is automatically generated. Run `./eng/scripts/GenerateProjectList.ps1` to update.

  This file contains a complete list of projects annotated for trimming.

  This file is generated using the <IsTrimmable> properties from each .csproj in this repository.
-->
<Project>
  <ItemGroup>
    @(_TrimmableProject->'<TrimmableProject Include="%(Identity)" />', '%0A    ')
  </ItemGroup>
</Project>
      ]]>
      </TrimmableProjectsListContent>
    </PropertyGroup>

    <WriteLinesToFile File="$(TrimmableProjectsList)" Lines="$(TrimmableProjectsListContent)" Overwrite="true" />
    <Message Importance="High" Text="Generated $(TrimmableProjectsList)" />

    <PropertyGroup>
      <DelayedBuildFile>$(MSBuildThisFileDirectory)RequiresDelayedBuildProjects.props</DelayedBuildFile>
      <DelayedBuildContent><![CDATA[<!--
  This file is automatically generated. Run `./eng/scripts/GenerateProjectList.ps1` to update.

  This file contains a list of projects that must be restored etc. after App.Ref and App.Runtime are fully built.

  This file is generated using <RequiresDelayedBuild/> properties. Content may overlap ProjectReferences.csproj
  but that is not required (projects that are not project reference providers are also supported).
-->
<Project>
  <ItemGroup>
    @(_RequiresDelayedBuild->'<RequiresDelayedBuild Include="%24(RepoRoot)%(ProjectFileRelativePath)" />', '%0A    ')
  </ItemGroup>
</Project>
]]></DelayedBuildContent>
    </PropertyGroup>

    <!-- Workaround https://github.com/Microsoft/msbuild/issues/1024 -->
    <WriteLinesToFile Condition="'$(OS)' == 'Windows_NT'"
                      File="$(DelayedBuildFile)" Lines="$([MSBuild]::Escape($(DelayedBuildContent)))" Overwrite="true" />
    <Exec Condition="'$(OS)' != 'Windows_NT'"
          Command="echo '$(DelayedBuildContent.Replace('\t','\\t'))' > $(DelayedBuildFile)" />
    <Message Importance="High" Text="Generated $(DelayedBuildFile)" />
  </Target>
</Project>