| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- <Project>
- <PropertyGroup>
- <BuildManaged>true</BuildManaged>
- <RepoRoot>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', '..'))</RepoRoot>
- </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="_ProjectReferenceProvider"/>
- </MSBuild>
- <ItemGroup>
- <_SharedFrameworkAndPackageRef Include="@(_ProjectReferenceProvider->WithMetadataValue('IsAspNetCoreApp','true')->WithMetadataValue('IsShippingPackage', 'true')->Distinct())" />
- <_SharedFrameworkRef Include="@(_ProjectReferenceProvider->WithMetadataValue('IsAspNetCoreApp','true')->WithMetadataValue('IsShippingPackage', 'false')->Distinct())" />
- <_ProjectReferenceProviderWithRefAssembly Include="@(_ProjectReferenceProvider->HasMetadata('ReferenceAssemblyProjectFileRelativePath'))" />
- <_ProjectReferenceProvider Remove="@(_ProjectReferenceProviderWithRefAssembly)" />
- </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 ')
- @(_ProjectReferenceProviderWithRefAssembly->'<ProjectReferenceProvider Include="%(Identity)" ProjectPath="%24(RepoRoot)%(ProjectFileRelativePath)" RefProjectPath="%24(RepoRoot)%(ReferenceAssemblyProjectFileRelativePath)" />', '%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 project is generated using the <IsAspNetCoreApp> and <IsShippingPackage> 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)" />
- </Target>
- <Target Name="GenerateReferenceSources">
- <MSBuild
- Projects="@(ProjectToBuild)"
- Targets="GenerateReferenceSource"
- SkipNonexistentTargets="true"
- SkipNonexistentProjects="true" />
- </Target>
- </Project>
|