| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154 |
- <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);@(ExplicitRequiresDelay)"
- 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'))" />
- <_ShippingAssemblyWithDupes Include="@(_ProjectReferenceProvider->WithMetadataValue('IsAspNetCoreApp', 'true'))" />
- <_ShippingAssemblyWithDupes Include="@(_ProjectReferenceProvider->WithMetadataValue('IsShippingPackage', 'true'))" />
- <_ShippingAssembly Include="@(_ShippingAssemblyWithDupes->Distinct())" />
- <!-- _ProjectReferenceProvider is already Distinct() and does not include metadata for each target framework. -->
- <!-- If a project is trimmable for even just one of multiple target frameworks, include it in TrimmableProjects.props. -->
- <_TrimmableProject Include="@(_ProvidesReferenceOrRequiresDelay->WithMetadataValue('IsTrimmable', 'true')->WithMetadataValue('IsProjectReferenceProvider','true')->Distinct())" />
- </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)" />', '$([System.Environment]::NewLine) ')
- </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>
- <ShippingAssembliesFile>$(MSBuildThisFileDirectory)ShippingAssemblies.props</ShippingAssembliesFile>
- <ShippingAssembliesContent><![CDATA[<!--
- This file is automatically generated. Run `./eng/scripts/GenerateProjectList.ps1` to update.
- This file contains a list of all assemblies shipped from this repo, either via the Shared Framework or Nuget packages (or both).
- -->
- <Project>
- <ItemGroup>
- @(_ShippingAssembly->'<AspNetCoreShippingAssembly Include="%(Identity)" />', '$([System.Environment]::NewLine) ')
- </ItemGroup>
- </Project>
- ]]></ShippingAssembliesContent>
- </PropertyGroup>
- <!-- Workaround https://github.com/Microsoft/msbuild/issues/1024 -->
- <WriteLinesToFile Condition="'$(OS)' == 'Windows_NT'"
- File="$(ShippingAssembliesFile)" Lines="$([MSBuild]::Escape($(ShippingAssembliesContent)))" Overwrite="true" />
- <Exec Condition="'$(OS)' != 'Windows_NT'"
- Command="echo '$(ShippingAssembliesContent.Replace('\t','\\t'))' > $(ShippingAssembliesFile)" />
- <Message Importance="High" Text="Generated $(ShippingAssembliesFile)" />
- <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)" />', '$([System.Environment]::NewLine) ')
- <!-- These assemblies are only in the shared framework -->
- @(_SharedFrameworkRef->'<AspNetCoreAppReference Include="%(Identity)" />', '$([System.Environment]::NewLine) ')
- </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)" />', '$([System.Environment]::NewLine) ')
- </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)" />', '$([System.Environment]::NewLine) ')
- </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>
|