Skip to content

Improve generation and use of ref/ projects #17311

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 56 commits into from
Dec 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
7e4df0d
Remove useless src/PackageArchive files
dougbu Nov 16, 2019
6a22883
Improve use of ref/ assemblies
dotnet-maestro[bot] Sep 25, 2019
aa74887
Improve ref/ project generation
dougbu Nov 16, 2019
760a9a1
Use a response file for GenAPI commands
dougbu Nov 21, 2019
5de1317
Perform smaller cleanup
dougbu Nov 16, 2019
c2c4cbb
Correct use of `@(ProjectReference)` items for reference providers
dougbu Nov 16, 2019
5135c07
Undo some manual ref/ project changes
dougbu Nov 16, 2019
b1b5851
Remove `private` members from ref/ *.Manual.cs files
dougbu Nov 21, 2019
bf6327b
Remove recently-added `@(Compile)` and `@(Reference)` items
dougbu Nov 16, 2019
ef5a318
Remove `@(RuntimeHostConfigurationOption)` workarounds
dougbu Nov 16, 2019
3d04839
Cleanup warnings
dougbu Sep 22, 2019
1ff0b74
Regenerate ref/ projects
dougbu Nov 16, 2019
10bea54
Fill in missing `internal` types 1 of n
dougbu Nov 17, 2019
0a08008
Add Microsoft.AspNetCore.Routing.Manual.cs
wtgodbe Nov 27, 2019
aaf0965
Add Microsoft.AspNetCore.Authentication.AzureAD.UI.Manual.cs
wtgodbe Nov 27, 2019
4551eff
Fixup Microsoft.AspNetCore.Routing.Manual.cs
wtgodbe Nov 27, 2019
fed7128
Add Microsoft.AspNetCore.Authentication.AzureADB2C.UI.Manual.cs
wtgodbe Nov 27, 2019
8617ac7
Add Manual.cs files for Server projects
Nov 28, 2019
cddda70
Clean up recent commits
dougbu Dec 1, 2019
8d7883b
Add *.Manual.cs files for src/Hosting projects
dougbu Dec 1, 2019
6acbbf0
!fixup! fields in *.Manual.cs `struct`s
dougbu Dec 1, 2019
367a497
Add a few more `internal` types needed in tests
dougbu Dec 2, 2019
9f8eaf5
Add *.Manual.cs files for src/DataProtection projects
Dec 4, 2019
4390da3
Add / update *.Manual.cs files for src/Middleware
dougbu Dec 4, 2019
79bd418
Remove special case for generating ref/ projects on non-Windows
dougbu Dec 4, 2019
4bc6190
Feedback
Dec 4, 2019
ef2c2a9
Add manual.cs for Mvc.NewtonsoftJson
wtgodbe Dec 5, 2019
b1f18be
Add Manual file for Mvc.ApiExplorer
wtgodbe Dec 5, 2019
1625c9b
Add manual stuff for Mvc.DataAnnotations
wtgodbe Dec 5, 2019
40dc1b4
Add manual stuff for Mvc.Formatters.Xml
wtgodbe Dec 5, 2019
c235e37
Add manul file for Mvc.Localization
wtgodbe Dec 5, 2019
811d71f
Add manual file for Authentication.Negotiate
wtgodbe Dec 6, 2019
b94c81b
Add missed reference in Extensions.Identity.Stores
wtgodbe Dec 6, 2019
3016def
Add / update *.Manual.cs files for src/Components
Dec 6, 2019
e5e7f25
Fixup Mvc.Viewfeatures.Manual.cs
wtgodbe Dec 6, 2019
c92cfba
fixup Mvc.NewtonsoftJson.Manual.cs
wtgodbe Dec 6, 2019
722a1f9
Fixup structs in src/Components
Dec 6, 2019
30ef8db
Add more `internal` members to src/Mvc/Mvc.Core/ref
dougbu Dec 6, 2019
d29247d
!fixup! add another `internal` type to Microsoft.AspNetCore.Mvc.Core.…
dougbu Dec 6, 2019
7b29b45
Fix Servers/Kestrel with manual types
wtgodbe Dec 6, 2019
e4e6fbe
!fixup! Still more `internal` Mvc.Core types
dougbu Dec 6, 2019
fa8a776
Add manual file for Mvc.TagHelpers
wtgodbe Dec 6, 2019
72e0ea6
Add more manual types to Mvc.ViewFeatures
wtgodbe Dec 6, 2019
5f2919c
Add manual file for Mvc.Cors
wtgodbe Dec 6, 2019
7d97608
Fixup Mvc.Razorpages manual issues
wtgodbe Dec 7, 2019
964c23b
Only create ref/ projects for assemblies in the shared framework
dougbu Dec 7, 2019
3c942fa
Remove "extra" ref/ projects
dougbu Dec 7, 2019
36c505c
Add a few GenAPI exclusions
dougbu Dec 8, 2019
fbfd056
Add more `internal` types and members
dougbu Dec 8, 2019
1ca2483
Fixup NU5128 warnings
Dec 11, 2019
348eadf
Add direct dependencies to work around CS1705 errors
dougbu Dec 11, 2019
05f9c8d
nits: Remove a few more `private` members in *.Manual.cs files
dougbu Dec 11, 2019
ac44986
!fixup! correct namespaces of a few types in *.Manual.cs files
dougbu Dec 11, 2019
0c0d845
Try another way to fix Microsoft.AspNetCore.Blazor.Build.Tests
dougbu Dec 11, 2019
76363d1
Try another way to fix missing targets in Web.JS.npmproj
dougbu Dec 11, 2019
6bd4798
Revert "Fixup NU5128 warnings"
dougbu Dec 11, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 8 additions & 8 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@
<RuntimeInstallerBaseName>aspnetcore-runtime</RuntimeInstallerBaseName>
<TargetingPackInstallerBaseName>aspnetcore-targeting-pack</TargetingPackInstallerBaseName>

<!-- 3.0.1 is a special servicing release since we're building the targeting pack. We need this condition in a few places. -->
<IsTargetingPackPatching Condition="'$(VersionPrefix)' == '3.0.1'">true</IsTargetingPackPatching>

<!-- Used to only produce targeting pack installers/packages once per major.minor. -->
<IsTargetingPackBuilding Condition="'$(AspNetCorePatchVersion)' != '0' OR '$(DotNetBuildFromSource)' == 'true'">false</IsTargetingPackBuilding>

<!-- We need to build the targeting pack in 3.0.1. We can remove this line from any branch other than release/3.0 -->
<IsTargetingPackBuilding Condition="'$(IsTargetingPackPatching)' == 'true' AND '$(DotNetBuildFromSource)' != 'true'">true</IsTargetingPackBuilding>
<!-- Produce targeting pack installers/packages once per major.minor except in extraordinary cases i.e. 3.0.1. -->
<!-- We can remove the 3.0.1 line from any branch other than release/3.0 and from here after 3.0.1 is released. -->
<IsTargetingPackBuilding Condition=" '$(DotNetBuildFromSource)' == 'true' ">false</IsTargetingPackBuilding>
<IsTargetingPackBuilding
Condition=" '$(IsTargetingPackBuilding)' == '' AND '$(VersionPrefix)' == '3.0.1' ">true</IsTargetingPackBuilding>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can probably just remove the "3.0.1" condition, since we're done building it

<IsTargetingPackBuilding
Condition=" '$(IsTargetingPackBuilding)' == '' AND '$(AspNetCorePatchVersion)' != '0' ">false</IsTargetingPackBuilding>
<IsTargetingPackBuilding Condition=" '$(IsTargetingPackBuilding)' == '' ">true</IsTargetingPackBuilding>

<!--
Archives and installers using this prefix are intended for internal-use only.
Expand Down
21 changes: 9 additions & 12 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
-->
<IsPackable Condition="'$(IsAspNetCoreApp)' == 'true' AND '$(IsShippingPackage)' != 'true'">false</IsPackable>

<!-- Only build assemblies in Microsoft.AspNetCore.App in source build -->
<!-- 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 '$(IsAnalyzersProject)' != 'true'">true</ExcludeFromSourceBuild>
<ExcludeFromSourceBuild
Condition="'$(ExcludeFromSourceBuild)' == '' and '$(DotNetBuildFromSource)' == 'true' and '$(IsAspNetCoreApp)' != 'true' and '$(IsReferenceAssemblyProject)' != 'true' and '$(IsAnalyzersProject)' != 'true'">true</ExcludeFromSourceBuild>
</PropertyGroup>

<PropertyGroup Label="Resx settings">
Expand Down Expand Up @@ -58,15 +59,11 @@

<Import Project="eng\Baseline.Designer.props" />

<PropertyGroup
Condition=" '$(IsPackable)' != 'false' AND '$(AspNetCorePatchVersion)' != '0' AND '$(DisableServicingFeatures)' != 'true' ">
<IsPackageInThisPatch Condition="'$(IsPackageInThisPatch)' == ''">true</IsPackageInThisPatch>
</PropertyGroup>

<PropertyGroup Condition=" '$(IsPackable)' != 'false' AND '$(IsServicingBuild)' == 'true' ">
<IsPackageInThisPatch Condition="'$(IsPackageInThisPatch)' == ''">true</IsPackageInThisPatch>
<!-- Used to distinguish between packages building -->
<IsPackableInNonServicingBuild>true</IsPackableInNonServicingBuild>
<!-- Suppress creation of .nupkg for servicing builds. -->
<!-- Suppress creation of .nupkg for servicing builds of non-shipping projects. -->
<IsPackable Condition=" '$(IsPackageInThisPatch)' != 'true' ">false</IsPackable>
</PropertyGroup>

Expand All @@ -88,7 +85,7 @@
<Version Condition="'$(NoBuild)' == 'true' AND '$(DesignTimeBuild)' == 'true'">$(BaselinePackageVersion)</Version>
<PackageVersion Condition="'$(NoBuild)' == 'true' AND '$(DesignTimeBuild)' == 'true'">$(BaselinePackageVersion)</PackageVersion>

<!-- For servicing builds, we want to resolve basline versions of project packages that aren't building, always -->
<!-- For servicing builds, we want to resolve baseline versions of project packages that aren't building, always -->
<PackageVersionForPackageVersionInfo>$(BaselinePackageVersion)</PackageVersionForPackageVersionInfo>
</PropertyGroup>

Expand All @@ -99,7 +96,8 @@
<!-- 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'">true</HasReferenceAssembly>
<HasReferenceAssembly
Condition=" '$(HasReferenceAssembly)' == '' AND '$(IsProjectReferenceProvider)' == 'true' AND '$(IsAspNetCoreApp)' == 'true' ">true</HasReferenceAssembly>
<HasReferenceAssembly Condition="'$(HasReferenceAssembly)' == ''">false</HasReferenceAssembly>

<IsPackable Condition="'$(IsPackable)' == '' AND ('$(IsImplementationProject)' == 'true' OR '$(IsAnalyzersProject)' == 'true') ">true</IsPackable>
Expand Down Expand Up @@ -161,13 +159,12 @@
</Target>

<Import Project="eng\Workarounds.targets" />
<Import Project="eng\IndirectReferences.props" Condition="'$(IsTestProject)' == 'true' OR '$(IsTestAssetProject)' == 'true' OR '$(IsBenchmarkProject)' == 'true' OR '$(IsSampleProject)' == 'true'" />
<Import Project="eng\targets\ResolveIisReferences.targets" Condition=" '$(MSBuildProjectExtension)' != '.vcxproj' " />
<Import Project="eng\targets\Cpp.Common.targets" Condition="'$(MSBuildProjectExtension)' == '.vcxproj'" />
<Import Project="eng\targets\CSharp.Common.targets" Condition="'$(MSBuildProjectExtension)' == '.csproj'" />
<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)' == 'true' " />
<Import Project="eng\targets\ReferenceAssembly.targets" Condition=" $(HasReferenceAssembly) " />

</Project>
30 changes: 29 additions & 1 deletion eng/Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,35 @@
@(ProjectToExclude);
$(RepoRoot)**\node_modules\**\*;
$(RepoRoot)**\bin\**\*;
$(RepoRoot)**\obj\**\*;" />
$(RepoRoot)**\obj\**\*;"
Condition=" '$(BuildMainlyReferenceProviders)' != 'true' " />
<DotNetProjects Include="
$(RepoRoot)src\DefaultBuilder\**\src\*.csproj;
$(RepoRoot)src\Features\JsonPatch\**\src\*.csproj;
$(RepoRoot)src\DataProtection\**\src\*.csproj;
$(RepoRoot)src\Antiforgery\**\src\*.csproj;
$(RepoRoot)src\Hosting\**\src\*.csproj;
$(RepoRoot)src\Http\**\src\*.csproj;
$(RepoRoot)src\Html\**\src\*.csproj;
$(RepoRoot)src\Identity\**\src\*.csproj;
$(RepoRoot)src\Servers\**\src\*.csproj;
$(RepoRoot)src\Security\**\src\*.csproj;
$(RepoRoot)src\SiteExtensions\**\src\*.csproj;
$(RepoRoot)src\Tools\**\src\*.csproj;
$(RepoRoot)src\Middleware\**\src\*.csproj;
$(RepoRoot)src\Razor\**\src\*.csproj;
$(RepoRoot)src\Mvc\**\src\*.csproj;
$(RepoRoot)src\Azure\**\src\*.csproj;
$(RepoRoot)src\SignalR\**\src\*.csproj;
$(RepoRoot)src\Components\**\src\*.csproj;
"
Exclude="
@(ProjectToBuild);
@(ProjectToExclude);
$(RepoRoot)**\node_modules\**\*;
$(RepoRoot)**\bin\**\*;
$(RepoRoot)**\obj\**\*;"
Condition=" '$(BuildMainlyReferenceProviders)' == 'true' " />

<ProjectToBuild Condition=" '$(BuildManaged)' == 'true'" Include="@(DotNetProjects)" Exclude="@(ProjectToExclude)" />
<ProjectToExclude Condition=" '$(BuildManaged)' != 'true'" Include="@(DotNetProjects)" />
Expand Down
2 changes: 1 addition & 1 deletion eng/CodeGen.proj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<PropertyGroup>
<BuildManaged>true</BuildManaged>
<RepoRoot>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', '..'))</RepoRoot>
<BuildMainlyReferenceProviders>true</BuildMainlyReferenceProviders>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this property mean? Maybe add a comment

</PropertyGroup>

<Import Project="Build.props" />
Expand All @@ -15,7 +16,6 @@
BuildInParallel="true"
SkipNonexistentTargets="true"
SkipNonexistentProjects="true" >

<Output TaskParameter="TargetOutputs" ItemName="_ProjectReferenceProvider"/>
</MSBuild>

Expand Down
46 changes: 45 additions & 1 deletion eng/GenAPI.exclusions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,48 @@ F:Microsoft.AspNetCore.Mvc.Razor.Infrastructure.TagHelperMemoryCacheProvider.{Ca
M:Microsoft.AspNetCore.Mvc.Razor.Infrastructure.TagHelperMemoryCacheProvider.#ctor
P:Microsoft.AspNetCore.Mvc.Razor.Infrastructure.TagHelperMemoryCacheProvider.Cache
M:Microsoft.AspNetCore.Mvc.Razor.Infrastructure.TagHelperMemoryCacheProvider.get_Cache
M:Microsoft.AspNetCore.Mvc.Razor.Infrastructure.TagHelperMemoryCacheProvider.set_Cache(Microsoft.Extensions.Caching.Memory.IMemoryCache)
M:Microsoft.AspNetCore.Mvc.Razor.Infrastructure.TagHelperMemoryCacheProvider.set_Cache(Microsoft.Extensions.Caching.Memory.IMemoryCache)
# Manually implemented - Need to include internal setter
P:Microsoft.AspNetCore.Routing.Matching.CandidateState.Values
# Manually implemented - Need to include internal setter
P:Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions.KestrelServerOptions
# Manually implemented - Need to include private fields in struct with sequential layout
T:Microsoft.AspNetCore.Components.RenderHandle
P:Microsoft.AspNetCore.Components.RenderHandle.Dispatcher
P:Microsoft.AspNetCore.Components.RenderHandle.IsInitialized
M:Microsoft.AspNetCore.Components.RenderHandle.get_Dispatcher
M:Microsoft.AspNetCore.Components.RenderHandle.get_IsInitialized
M:Microsoft.AspNetCore.Components.RenderHandle.Render(Microsoft.AspNetCore.Components.RenderFragment)
T:Microsoft.AspNetCore.Components.ParameterView
P:Microsoft.AspNetCore.Components.ParameterView.Empty
M:Microsoft.AspNetCore.Components.ParameterView.FromDictionary(System.Collections.Generic.IDictionary{System.String,System.Object})
M:Microsoft.AspNetCore.Components.ParameterView.GetEnumerator
M:Microsoft.AspNetCore.Components.ParameterView.GetValueOrDefault``1(System.String)
M:Microsoft.AspNetCore.Components.ParameterView.GetValueOrDefault``1(System.String,``0)
M:Microsoft.AspNetCore.Components.ParameterView.get_Empty
M:Microsoft.AspNetCore.Components.ParameterView.SetParameterProperties(System.Object)
M:Microsoft.AspNetCore.Components.ParameterView.ToDictionary
M:Microsoft.AspNetCore.Components.ParameterView.TryGetValue``1(System.String,``0@)
T:Microsoft.AspNetCore.Components.ParameterView.Enumerator
P:Microsoft.AspNetCore.Components.ParameterView.Enumerator.Current
M:Microsoft.AspNetCore.Components.ParameterView.Enumerator.get_Current
M:Microsoft.AspNetCore.Components.ParameterView.Enumerator.MoveNext
T:Microsoft.AspNetCore.Components.EventCallback
F:Microsoft.AspNetCore.Components.EventCallback.Empty
F:Microsoft.AspNetCore.Components.EventCallback.Factory
M:Microsoft.AspNetCore.Components.EventCallback.#ctor(Microsoft.AspNetCore.Components.IHandleEvent,System.MulticastDelegate)
P:Microsoft.AspNetCore.Components.EventCallback.HasDelegate
M:Microsoft.AspNetCore.Components.EventCallback.get_HasDelegate
M:Microsoft.AspNetCore.Components.EventCallback.InvokeAsync(System.Object)
T:Microsoft.AspNetCore.Components.EventCallback`1
F:Microsoft.AspNetCore.Components.EventCallback`1.Empty
M:Microsoft.AspNetCore.Components.EventCallback`1.#ctor(Microsoft.AspNetCore.Components.IHandleEvent,System.MulticastDelegate)
P:Microsoft.AspNetCore.Components.EventCallback`1.HasDelegate
M:Microsoft.AspNetCore.Components.EventCallback`1.get_HasDelegate
M:Microsoft.AspNetCore.Components.EventCallback`1.InvokeAsync(`0)
# Manually implemented - Need to include internal setter
P:Microsoft.AspNetCore.Mvc.RazorPages.RazorPagesOptions.Conventions
# Break GenAPI - https://github.com/dotnet/arcade/issues/4488
T:Microsoft.AspNetCore.Mvc.ApplicationModels.ActionAttributeRouteModel.<GetAttributeRoutes>d__3
T:Microsoft.AspNetCore.Components.Rendering.HtmlRenderer.<CreateInitialRenderAsync>d__17
T:Microsoft.AspNetCore.Components.Rendering.HtmlRenderer.<RenderComponentAsync>d__8
Loading