• D
    Further centralize shared Fx and TFM transition workarounds (#27473) · 5fd1db26
    Doug Bunting 提交于
    * Further centralize shared Fx and TFM transition workarounds
      - make generated `Directory.Build.*` files more widely applicable
        - warn if requested Microsoft.AspNetCore.App version does not exist in `$(DOTNET_ROOT)`
        - add `$(UpdateAspNetCoreKnownFramework)` for Microsoft.AspNetCore.App `@(KnownFrameworkReference)` update
        - remove central `$(BuildingTestAppsIndependently)` special case
          - not needed because compiler toolset version is always available
        - correct `$(KnownAppHostPackOrFrameworkReferenceTfm)` when not targeting the default TFM
          - use MSBuild intrinsic functions for this and in framework projects; future-proofing
        - correct `@(KnownFrameworkReference)` metadata when in servicing
           - should not override default runtime and targeting pack versions
      - use generated `Directory.Build.*` files in regular build
        - remove now-duplicate property and item settings outside generated `Directory.Build.*` files
      - use generated `Directory.Build.*` files for local Razor tests
        - set `$(TargetLatestRuntimePatch)` instead of `$(RuntimeFrameworkVersion)`; simpler
        - do not restore Razor SDK test asset projects until just before tests run
        - depend on Microsoft.AspNetCore.App projects
        - disable `$(TreatWarningsAsErrors)` for a few Razor SDK tests
          - tests expect projects to build successfully despite a few warnings
      - improve (widen) Microsoft.AspNetCore.App `Condition` in Blazor SDK tests
    
    nit: do not pass `$(MicrosoftNetCompilersToolsetVersion)` into Razor test asset projects
      - not needed because generated files already contain the right information
      - even without that, the Directory.Build.props file imports eng/Versions.props
    
    * Use generated `Directory.Build.*` files for local template tests
      - move Infrastructure/ files to TestInfrastructure/
        - Infrastructure/ sub-directories were functionally identical
      - move shared parts of template test project files to PrepareForTest.targets
    
    * Describe errors with missing generated files and the new warning in BuildFromSource.md
      - address numerous Markdown lint warnings, typos, and spelling mistakes in this file
    
    * Apply suggestions from code review
      - thanks @captainsafia
    
    * Move all troubleshooting information into BuildErrors.md
      - some was already duplicated
      - fix Markdown lint issues in BuildErrors.md too
    
    * Reorder App.Runtime build slightly
      - move `_InstallFrameworkIntoLocalDotNet` earlier because other builds depend on this part
        - this target sometimes executes after dependent projects continue
      - add `DependsOnTargets` attributes to further constrain ordering
    
    nit: `IncludeFrameworkListFile` should run before `_ResolveSharedFrameworkContent`
    
    * Add temporary workaround for `[AssemblyVersion]` changes
    
    * Address @wtgodbe's nit from #27653
      - https://github.com/dotnet/aspnetcore/pull/27653#pullrequestreview-529368502Co-authored-by: NSafia Abdalla <safia@microsoft.com>
    5fd1db26