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

github.com/dotnet/aspnetcore.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Bunting <6431421+dougbu@users.noreply.github.com>2020-07-17 23:35:17 +0300
committerGitHub <noreply@github.com>2020-07-17 23:35:17 +0300
commit5266918ed2be1989e11bba1396806c5aaa67d441 (patch)
tree1b4a1b049912d2923c0d76d01d024de8b5ee97f7 /Directory.Build.targets
parent59b94e4b9230f9bcc60959ec330b67188786e619 (diff)
Use Roslyn to create ref/ assemblies (#23403)
* Remove all ref/ projects * Remove GenAPI infrastructure * Remove notion of a reference assembly project - remove `$(IsReferenceAssemblyProject)`, `$(ReferenceReferenceAssemblies)` and `$(ReferenceImplementationAssemblies)` - remove unnecessary `$(NoWarn)` settings nits: - remove a few misleading comments - wrap some long lines * Move .0 package version workaround into Versions.props - touch up SharedFramework.External.props * Expose `%(LatestPackageReference.RTMVersion)` metadata - automate use of properties in the `@(LatestPackageReference)` item group to make this maintainable - add a couple of special cases at the bottom of eng/Dependencies.props - add one more `$(...PackageVersion)` property to avoid yet-another special case * Enable Roslyn reference assemblies - exclude ref/ assembly from packages other than targeting pack - update Microsoft.AspNetCore.App.Ref.csproj - `%(IsReferenceAssembly)` and `%(ReferenceGrouping)` metadata no longer relevant - only ref/ assemblies are in `@(ReferencePathWithRefAssemblies)` item group nits: - remove now-unnecessary workaround - issues with TFM transition are behind us - clean up Microsoft.AspNetCore.App.Runtime.csproj slightly - use `GeneratePathProperty="true"` - reorder item / property settings for meta-expansion - correct spelling errors and phrasing in comments * Update documentation to reflect recent changes - remove CrossRepoBreakingChanges.md; was tied to old TeamCity infrastructure - also much less relevant given repo merges - adjust details and examples in ReferenceResolution.md - reflect repo merges, Dependencies.props changes, and current Maestro++ channels - add a few more details e.g. specific files where Version.Details.xml versions are used * !fixup! Remove another irrelevant doc file * !fixup! Address PR review suggestions - convert a couple of warnings to errors - use consistent casing for Microsoft.NETCore.App.Runtime.* packages - reduce `%(LatestPackageReference.Version)` metadata special cases - add and improve comments e.g. - improve comments about `$(*V0PackageVersion)` properties - improve placement of comments about item removal in ResolveReferences.targets - confirmed `$(*V0PackageVersion)` property list is complete nits: - fix solution example in ReferenceResolution.md - remove item group definition for `@(LatestPackageReference)` - remove `%(LatestPackageReference.VersionName)` metadata after use; large item group - similarly, remove `%(LatestPackageReference.RTMVersion)` when not needed; just complicates `Condition`s When I squash, I must remember this fixes - #14801 - dotnet/aspnetcore-internal#2693 * Actually use `%(LatestPackageReference.RTMVersion)` metadata - gather RTM package references in a new project - a (very) separate project to work around package conflict resolution - empty `Test` target works around Arcade's testing approach - new target in ResolveReferences.targets updates relevant assembly paths to use the RTM packages - done as soon as possible after `ResolvePackageAssets` determines the paths - done for all compilation inputs, not just ref/ assemblies
Diffstat (limited to 'Directory.Build.targets')
-rw-r--r--Directory.Build.targets23
1 files changed, 11 insertions, 12 deletions
diff --git a/Directory.Build.targets b/Directory.Build.targets
index f89af5200c..a0de4f05b6 100644
--- a/Directory.Build.targets
+++ b/Directory.Build.targets
@@ -1,10 +1,10 @@
-<Project>
+<Project>
<PropertyGroup>
<!-- Only build Microsoft.AspNetCore.App and ref/ assemblies in source build. -->
<!-- Analyzer package are needed in source build for WebSDK -->
<ExcludeFromSourceBuild
- Condition="'$(ExcludeFromSourceBuild)' == '' and '$(DotNetBuildFromSource)' == 'true' and '$(IsAspNetCoreApp)' != 'true' and '$(IsReferenceAssemblyProject)' != 'true' and '$(IsAnalyzersProject)' != 'true'">true</ExcludeFromSourceBuild>
+ Condition="'$(ExcludeFromSourceBuild)' == '' and '$(DotNetBuildFromSource)' == 'true' and '$(IsAspNetCoreApp)' != 'true' and '$(IsAnalyzersProject)' != 'true'">true</ExcludeFromSourceBuild>
<!-- If the user has specified that they want to skip building any test related projects with SkipTestBuild,
suppress all targets for TestProjects using ExcludeFromBuild. -->
@@ -57,7 +57,8 @@
<PropertyGroup Condition=" '$(MSBuildProjectExtension)' == '.csproj' ">
<PackageId Condition=" '$(PackageId)' == '' ">$(AssemblyName)</PackageId>
- <IsPackable Condition="'$(IsPackable)' == '' AND ( '$(IsTestProject)' == 'true' OR '$(IsTestAssetProject)' == 'true' OR '$(IsBenchmarkProject)' == 'true' OR '$(IsSampleProject)' == 'true' OR '$(IsReferenceAssemblyProject)' == 'true' ) ">false</IsPackable>
+ <IsPackable
+ Condition="'$(IsPackable)' == '' AND ( '$(IsTestProject)' == 'true' OR '$(IsTestAssetProject)' == 'true' OR '$(IsBenchmarkProject)' == 'true' OR '$(IsSampleProject)' == 'true' ) ">false</IsPackable>
</PropertyGroup>
<Import Project="eng\Baseline.Designer.props" />
@@ -100,14 +101,19 @@
<PropertyGroup>
<!-- Implementation projects are the projects which produce nuget packages or shipping assemblies. -->
- <IsImplementationProject Condition=" '$(IsImplementationProject)' == '' AND '$(IsAnalyzersProject)' != 'true' AND '$(IsTestAssetProject)' != 'true' AND '$(IsTestProject)' != 'true' AND '$(IsBenchmarkProject)' != 'true' AND '$(IsSampleProject)' != 'true' AND '$(IsReferenceAssemblyProject)' != 'true' ">true</IsImplementationProject>
+ <IsImplementationProject Condition=" '$(IsImplementationProject)' == '' AND '$(IsAnalyzersProject)' != 'true' AND '$(IsTestAssetProject)' != 'true' AND '$(IsTestProject)' != 'true' AND '$(IsBenchmarkProject)' != 'true' AND '$(IsSampleProject)' != 'true' ">true</IsImplementationProject>
<!-- This determines whether a project is available as a <Reference> to other projects in this repo. -->
<IsProjectReferenceProvider Condition=" '$(IsProjectReferenceProvider)' == '' AND '$(IsImplementationProject)' == 'true' AND '$(PackAsTool)' != 'true' ">true</IsProjectReferenceProvider>
<HasReferenceAssembly
- Condition=" '$(HasReferenceAssembly)' == '' AND '$(IsProjectReferenceProvider)' == 'true' AND '$(IsAspNetCoreApp)' == 'true' ">true</HasReferenceAssembly>
+ Condition=" '$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)' AND '$(IsAspNetCoreApp)' == 'true' ">true</HasReferenceAssembly>
<HasReferenceAssembly Condition="'$(HasReferenceAssembly)' == ''">false</HasReferenceAssembly>
+ <ProduceReferenceAssembly>$(HasReferenceAssembly)</ProduceReferenceAssembly>
+
+ <!-- Duplicate setting from Microsoft.Common.CurrentVersion.targets because this is imported after that file. -->
+ <TargetRefPath
+ Condition=" '$(TargetRefPath)' == '' and $(ProduceReferenceAssembly) ">$([MSBuild]::NormalizePath($(TargetDir), 'ref', $(TargetFileName)))</TargetRefPath>
<IsPackable Condition="'$(IsPackable)' == '' AND ('$(IsImplementationProject)' == 'true' OR '$(IsAnalyzersProject)' == 'true') ">true</IsPackable>
<IsPackable Condition="'$(IsPackable)' == '' ">false</IsPackable>
@@ -124,13 +130,7 @@
<None Include="$(PackageThirdPartyNoticesFile)" Pack="true" PackagePath="." />
</ItemGroup>
- <ItemGroup Condition="'$(Language)' == 'C#' AND '$(IsReferenceAssemblyProject)' == 'true'">
- <Compile Include="$(SharedSourceRoot)ReferenceAssemblyInfo.cs" LinkBase="Properties" />
- </ItemGroup>
-
<PropertyGroup Condition="'$(Language)' == 'C#'">
- <!-- Reference assemblies should always use Major.Minor.0.0 for assembly versions even during servicing. Only the package version should be updated. -->
- <!-- Pinning the implementation assemblies at Major.Minor.0.0 as we figure out compiling against ref assemblies. -->
<AssemblyVersion>$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).0.0</AssemblyVersion>
</PropertyGroup>
@@ -180,7 +180,6 @@
<Import Project="eng\targets\FSharp.Common.targets" Condition="'$(MSBuildProjectExtension)' == '.fsproj'" />
<Import Project="eng\targets\Wix.Common.targets" Condition="'$(MSBuildProjectExtension)' == '.wixproj'" />
<Import Project="eng\targets\Npm.Common.targets" Condition="'$(MSBuildProjectExtension)' == '.npmproj'" />
- <Import Project="eng\targets\ReferenceAssembly.targets" Condition=" $(HasReferenceAssembly) " />
<Import Project="eng\targets\Helix.targets" Condition="'$(IsTestProject)' == 'true'" />
<Import Project="eng\targets\FunctionalTestAsset.targets" Condition="'$(IsTestAssetProject)' == 'true'" />
<Import Project="eng\targets\FunctionalTestWithAssets.targets" Condition="'$(ContainsFunctionalTestAssets)' == 'true'" />