Browse Source

Add targets to generate the list of shared framework assemblies from project property (#7510)

Changes:
* Add support for a property, `IsAspNetCoreApp`, in the .csproj file of assemblies which are part of the shared framework. 
* Remove unused dependencies
* Remove reference which have become part of 'netcoreapp3.0'
Nate McMaster 7 years ago
parent
commit
3fd8a97af2
98 changed files with 406 additions and 268 deletions
  1. 2 0
      Directory.Build.props
  2. 0 26
      build/SharedFrameworkOnly.props
  3. 2 2
      build/repo.props
  4. 32 1
      build/repo.targets
  5. 1 0
      docs/ProjectProperties.md
  6. 10 1
      docs/SharedFramework.md
  7. 0 4
      eng/Dependencies.props
  8. 105 0
      eng/SharedFramework.External.props
  9. 91 0
      eng/SharedFramework.Local.props
  10. 0 12
      eng/Version.Details.xml
  11. 0 4
      eng/Versions.props
  12. 41 0
      eng/targets/ResolveReferences.targets
  13. 1 0
      src/Antiforgery/src/Microsoft.AspNetCore.Antiforgery.csproj
  14. 1 0
      src/Components/Browser/src/Microsoft.AspNetCore.Components.Browser.csproj
  15. 1 0
      src/Components/Components/src/Microsoft.AspNetCore.Components.csproj
  16. 1 0
      src/DataProtection/Abstractions/src/Microsoft.AspNetCore.DataProtection.Abstractions.csproj
  17. 1 0
      src/DataProtection/Cryptography.Internal/src/Microsoft.AspNetCore.Cryptography.Internal.csproj
  18. 1 0
      src/DataProtection/Cryptography.KeyDerivation/src/Microsoft.AspNetCore.Cryptography.KeyDerivation.csproj
  19. 1 0
      src/DataProtection/DataProtection/src/Microsoft.AspNetCore.DataProtection.csproj
  20. 1 0
      src/DataProtection/Extensions/src/Microsoft.AspNetCore.DataProtection.Extensions.csproj
  21. 1 0
      src/DefaultBuilder/src/Microsoft.AspNetCore.csproj
  22. 0 158
      src/Framework/Microsoft.AspNetCore.App.props
  23. 9 4
      src/Framework/pkg/Metapackage.targets
  24. 0 2
      src/Framework/pkg/Microsoft.AspNetCore.App.pkgproj
  25. 2 3
      src/Framework/ref/Microsoft.AspNetCore.App.Ref.csproj
  26. 0 2
      src/Framework/src/Microsoft.AspNetCore.App.shfxproj
  27. 6 2
      src/Framework/src/SharedFx.targets
  28. 1 3
      src/Framework/test/Microsoft.AspNetCore.App.UnitTests.csproj
  29. 1 0
      src/Hosting/Abstractions/src/Microsoft.AspNetCore.Hosting.Abstractions.csproj
  30. 2 3
      src/Hosting/Hosting/src/Microsoft.AspNetCore.Hosting.csproj
  31. 1 0
      src/Hosting/Server.Abstractions/src/Microsoft.AspNetCore.Hosting.Server.Abstractions.csproj
  32. 1 0
      src/Html/Abstractions/src/Microsoft.AspNetCore.Html.Abstractions.csproj
  33. 2 1
      src/Http/Authentication.Abstractions/src/Microsoft.AspNetCore.Authentication.Abstractions.csproj
  34. 1 0
      src/Http/Authentication.Core/src/Microsoft.AspNetCore.Authentication.Core.csproj
  35. 1 1
      src/Http/Headers/src/Microsoft.Net.Http.Headers.csproj
  36. 2 1
      src/Http/Http.Abstractions/src/Microsoft.AspNetCore.Http.Abstractions.csproj
  37. 1 1
      src/Http/Http.Extensions/src/Microsoft.AspNetCore.Http.Extensions.csproj
  38. 1 0
      src/Http/Http.Features/src/Microsoft.AspNetCore.Http.Features.csproj
  39. 1 0
      src/Http/Http/src/Microsoft.AspNetCore.Http.csproj
  40. 1 0
      src/Http/Routing.Abstractions/src/Microsoft.AspNetCore.Routing.Abstractions.csproj
  41. 2 1
      src/Http/Routing/src/Microsoft.AspNetCore.Routing.csproj
  42. 1 0
      src/Http/WebUtilities/src/Microsoft.AspNetCore.WebUtilities.csproj
  43. 1 0
      src/Identity/Core/src/Microsoft.AspNetCore.Identity.csproj
  44. 1 1
      src/Identity/Extensions.Core/src/Microsoft.Extensions.Identity.Core.csproj
  45. 1 1
      src/Identity/Extensions.Stores/src/Microsoft.Extensions.Identity.Stores.csproj
  46. 1 0
      src/Middleware/CORS/src/Microsoft.AspNetCore.Cors.csproj
  47. 1 0
      src/Middleware/Diagnostics.Abstractions/src/Microsoft.AspNetCore.Diagnostics.Abstractions.csproj
  48. 2 3
      src/Middleware/Diagnostics/src/Microsoft.AspNetCore.Diagnostics.csproj
  49. 2 1
      src/Middleware/HealthChecks/src/Microsoft.AspNetCore.Diagnostics.HealthChecks.csproj
  50. 2 1
      src/Middleware/HostFiltering/src/Microsoft.AspNetCore.HostFiltering.csproj
  51. 1 0
      src/Middleware/HttpOverrides/src/Microsoft.AspNetCore.HttpOverrides.csproj
  52. 2 1
      src/Middleware/HttpsPolicy/src/Microsoft.AspNetCore.HttpsPolicy.csproj
  53. 1 0
      src/Middleware/Localization.Routing/src/Microsoft.AspNetCore.Localization.Routing.csproj
  54. 1 0
      src/Middleware/Localization/src/Microsoft.AspNetCore.Localization.csproj
  55. 0 1
      src/Middleware/MiddlewareAnalysis/src/Microsoft.AspNetCore.MiddlewareAnalysis.csproj
  56. 1 0
      src/Middleware/ResponseCaching.Abstractions/src/Microsoft.AspNetCore.ResponseCaching.Abstractions.csproj
  57. 1 0
      src/Middleware/ResponseCaching/src/Microsoft.AspNetCore.ResponseCaching.csproj
  58. 1 0
      src/Middleware/ResponseCompression/src/Microsoft.AspNetCore.ResponseCompression.csproj
  59. 1 0
      src/Middleware/Rewrite/src/Microsoft.AspNetCore.Rewrite.csproj
  60. 1 0
      src/Middleware/Session/src/Microsoft.AspNetCore.Session.csproj
  61. 1 0
      src/Middleware/StaticFiles/src/Microsoft.AspNetCore.StaticFiles.csproj
  62. 1 0
      src/Middleware/WebSockets/src/Microsoft.AspNetCore.WebSockets.csproj
  63. 2 1
      src/Mvc/src/Microsoft.AspNetCore.Mvc.Abstractions/Microsoft.AspNetCore.Mvc.Abstractions.csproj
  64. 1 0
      src/Mvc/src/Microsoft.AspNetCore.Mvc.ApiExplorer/Microsoft.AspNetCore.Mvc.ApiExplorer.csproj
  65. 4 5
      src/Mvc/src/Microsoft.AspNetCore.Mvc.Core/Microsoft.AspNetCore.Mvc.Core.csproj
  66. 1 0
      src/Mvc/src/Microsoft.AspNetCore.Mvc.Cors/Microsoft.AspNetCore.Mvc.Cors.csproj
  67. 1 2
      src/Mvc/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Microsoft.AspNetCore.Mvc.DataAnnotations.csproj
  68. 1 0
      src/Mvc/src/Microsoft.AspNetCore.Mvc.Formatters.Json/Microsoft.AspNetCore.Mvc.Formatters.Json.csproj
  69. 1 0
      src/Mvc/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/Microsoft.AspNetCore.Mvc.Formatters.Xml.csproj
  70. 1 0
      src/Mvc/src/Microsoft.AspNetCore.Mvc.Localization/Microsoft.AspNetCore.Mvc.Localization.csproj
  71. 1 0
      src/Mvc/src/Microsoft.AspNetCore.Mvc.Razor/Microsoft.AspNetCore.Mvc.Razor.csproj
  72. 1 0
      src/Mvc/src/Microsoft.AspNetCore.Mvc.RazorPages/Microsoft.AspNetCore.Mvc.RazorPages.csproj
  73. 1 0
      src/Mvc/src/Microsoft.AspNetCore.Mvc.TagHelpers/Microsoft.AspNetCore.Mvc.TagHelpers.csproj
  74. 1 0
      src/Mvc/src/Microsoft.AspNetCore.Mvc.ViewFeatures/Microsoft.AspNetCore.Mvc.ViewFeatures.csproj
  75. 1 0
      src/Mvc/src/Microsoft.AspNetCore.Mvc/Microsoft.AspNetCore.Mvc.csproj
  76. 1 0
      src/Razor/Razor.Runtime/src/Microsoft.AspNetCore.Razor.Runtime.csproj
  77. 2 1
      src/Razor/Razor/src/Microsoft.AspNetCore.Razor.csproj
  78. 1 0
      src/Security/Authentication/Cookies/src/Microsoft.AspNetCore.Authentication.Cookies.csproj
  79. 1 0
      src/Security/Authentication/Core/src/Microsoft.AspNetCore.Authentication.csproj
  80. 1 0
      src/Security/Authentication/OAuth/src/Microsoft.AspNetCore.Authentication.OAuth.csproj
  81. 1 0
      src/Security/Authorization/Core/src/Microsoft.AspNetCore.Authorization.csproj
  82. 1 0
      src/Security/Authorization/Policy/src/Microsoft.AspNetCore.Authorization.Policy.csproj
  83. 1 0
      src/Security/CookiePolicy/src/Microsoft.AspNetCore.CookiePolicy.csproj
  84. 2 1
      src/Servers/Connections.Abstractions/src/Microsoft.AspNetCore.Connections.Abstractions.csproj
  85. 1 0
      src/Servers/HttpSys/src/Microsoft.AspNetCore.Server.HttpSys.csproj
  86. 1 0
      src/Servers/IIS/IIS/src/Microsoft.AspNetCore.Server.IIS.csproj
  87. 1 3
      src/Servers/IIS/IISIntegration/src/Microsoft.AspNetCore.Server.IISIntegration.csproj
  88. 1 3
      src/Servers/Kestrel/Core/src/Microsoft.AspNetCore.Server.Kestrel.Core.csproj
  89. 0 1
      src/Servers/Kestrel/Core/test/Microsoft.AspNetCore.Server.Kestrel.Core.Tests.csproj
  90. 1 0
      src/Servers/Kestrel/Kestrel/src/Microsoft.AspNetCore.Server.Kestrel.csproj
  91. 1 0
      src/Servers/Kestrel/Transport.Abstractions/src/Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.csproj
  92. 1 0
      src/Servers/Kestrel/Transport.Sockets/src/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.csproj
  93. 7 4
      src/SignalR/common/Http.Connections.Common/src/Microsoft.AspNetCore.Http.Connections.Common.csproj
  94. 2 2
      src/SignalR/common/Http.Connections/src/Microsoft.AspNetCore.Http.Connections.csproj
  95. 2 0
      src/SignalR/common/Protocols.NewtonsoftJson/src/Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson.csproj
  96. 6 4
      src/SignalR/common/SignalR.Common/src/Microsoft.AspNetCore.SignalR.Common.csproj
  97. 1 0
      src/SignalR/server/Core/src/Microsoft.AspNetCore.SignalR.Core.csproj
  98. 1 0
      src/SignalR/server/SignalR/src/Microsoft.AspNetCore.SignalR.csproj

+ 2 - 0
Directory.Build.props

@@ -154,6 +154,8 @@
   <Import Project="eng\Dependencies.props" />
   <Import Project="eng\PatchConfig.props" />
   <Import Project="eng\ProjectReferences.props" />
+  <Import Project="eng\SharedFramework.Local.props" />
+  <Import Project="eng\SharedFramework.External.props" />
   <Import Project="eng\targets\Cpp.Common.props"  Condition="'$(MSBuildProjectExtension)' == '.vcxproj'" />
   <Import Project="eng\targets\CSharp.Common.props"  Condition="'$(MSBuildProjectExtension)' == '.csproj'" />
   <Import Project="eng\targets\Wix.Common.props"  Condition="'$(MSBuildProjectExtension)' == '.wixproj'" />

+ 0 - 26
build/SharedFrameworkOnly.props

@@ -1,26 +0,0 @@
-<!--
-  This lists all assemblies which are part of the Microsoft.AspNetCore.App shared framework
-  and should not ship as NuGet packages.
--->
-<Project>
-
-  <Import Project="..\src\Framework\Microsoft.AspNetCore.App.props" />
-
-  <ItemGroup>
-    <!-- Packages to be removed from the shared framework but not done yet due to JSON.net dependency. -->
-    <SharedFrameworkAndPackage Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" />
-
-    <!-- Assemblies required by components and WebAssembly -->
-    <SharedFrameworkAndPackage Include="Microsoft.AspNetCore.Components" />
-    <SharedFrameworkAndPackage Include="Microsoft.AspNetCore.Components.Browser" />
-
-    <!-- Assemblies required by the SignalR client. -->
-    <SharedFrameworkAndPackage Include="Microsoft.AspNetCore.Http.Features" />
-    <SharedFrameworkAndPackage Include="Microsoft.AspNetCore.SignalR.Common" />
-    <SharedFrameworkAndPackage Include="Microsoft.AspNetCore.Connections.Abstractions" />
-    <SharedFrameworkAndPackage Include="Microsoft.AspNetCore.Http.Connections.Common" />
-
-    <SharedFrameworkOnlyPackage Include="@(Dependency)" Exclude="@(SharedFrameworkAndPackage);@(ExternalDependency)" />
-  </ItemGroup>
-
-</Project>

+ 2 - 2
build/repo.props

@@ -1,6 +1,4 @@
 <Project>
-  <Import Project="SharedFrameworkOnly.props" />
-
   <PropertyGroup>
     <TargetRuntimeIdentifier Condition="'$(TargetRuntimeIdentifier)' == ''">$(TargetOsName)-$(TargetArchitecture)</TargetRuntimeIdentifier>
   </PropertyGroup>
@@ -180,6 +178,8 @@
   </Choose>
 
   <Import Project="..\eng\Versions.props" />
+  <Import Project="..\eng\SharedFramework.Local.props" />
+  <Import Project="..\eng\SharedFramework.External.props" />
   <Import Project="runtimes.props" />
   <Import Project="CodeSign.props" />
 </Project>

+ 32 - 1
build/repo.targets

@@ -67,6 +67,11 @@
       <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())" />
+    </ItemGroup>
+
     <PropertyGroup>
       <ProjectListFile>$(MSBuildThisFileDirectory)..\eng\ProjectReferences.props</ProjectListFile>
       <ProjectListContent>
@@ -86,6 +91,32 @@
     </PropertyGroup>
 
     <WriteLinesToFile File="$(ProjectListFile)" Lines="$(ProjectListContent)" Overwrite="true" />
+
+    <PropertyGroup>
+      <SharedFxDepList>$(MSBuildThisFileDirectory)..\eng\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" />
   </Target>
 
   <!-- This is temporary until we can use FrameworkReference to build our own packages. -->
@@ -97,7 +128,7 @@
 
     <RepoTasks.RemoveSharedFrameworkDependencies Condition="@(_BuildOutput->Count()) != 0"
       Files="@(_BuildOutput)"
-      FrameworkOnlyPackages="@(SharedFrameworkOnlyPackage)" />
+      FrameworkOnlyPackages="@(AspNetCoreAppReference)" />
   </Target>
 
   <Target Name="GenerateBuildAssetManifest">

+ 1 - 0
docs/ProjectProperties.md

@@ -6,3 +6,4 @@ In addition to the standard set of MSBuild properties supported by Microsoft.NET
 Property name      | Meaning
 -------------------|--------------------------------------------------------------------------------------------
 IsShippingPackage  | When set to `true`, the package produced by from project is intended for use by customers. Defaults to  `false`, which means the package is intended for internal use only by Microsoft teams.
+IsAspNetCoreApp    | Set to `true` when the assembly is part of the [Microsoft.AspNetCore.App shared framework](./SharedFramework.md)

+ 10 - 1
docs/SharedFramework.md

@@ -7,7 +7,7 @@ Guidance on developing the ASP.NET Core shared framework (`Microsoft.AspNetCore.
 
 The ASP.NET Core shared framework contains assemblies that are fully developed, supported, and serviceable by Microsoft. You can think of this as constituting the ASP.NET Core *platform*. As such, all assemblies which are included in the shared framework are expected to meet specific requirements. Here are the principles we are using to guide our decisions about what is allowed in the shared framework.
 
-* Breaking changes are highly discouraged. Therefore, 
+* Breaking changes are highly discouraged. Therefore,
   * If it's in, it must be broadly useful and expected to be supported for at least several years.
   * The API for all assemblies in shared framework MUST NOT make breaking changes in patch or minor releases.
 * The complete closure of all assemblies must be in the shared framework, or must be in the "base framework", Microsoft.NETCore.App
@@ -19,3 +19,12 @@ The ASP.NET Core shared framework contains assemblies that are fully developed,
    * API we believe is essential for central experiences in .NET Core should be in the shared framework
    * Examples of central experiences: MVC, Kestrel, Razor, SignalR
 * New API can ship as out-of-band packages first, and move into the base framework later when it meets these standards
+
+### How to adjust what is in the shared framework
+
+The contents of the shared framework are defined in two ways:
+
+* [src/Framework/LocalDependencies.props](/src/Framework/LocalDependencies.props) - this file is generated from the .csproj files in this repo
+  by looking for projects which have set `<IsAspNetCoreApp>true</IsAspNetCoreApp>`.
+* [src/Framework/Microsoft.AspNetCore.App.props](/src/Framework/Microsoft.AspNetCore.App.props) - this file lists all assemblies shipped
+  in Microsoft.AspNetCore.App which are built by source code found in other repositories.

+ 0 - 4
eng/Dependencies.props

@@ -134,17 +134,13 @@ and are generated based on the last package release.
     <LatestPackageReference Include="StackExchange.Redis" Version="$(StackExchangeRedisPackageVersion)" />
     <LatestPackageReference Include="System.Buffers" Version="$(SystemBuffersPackageVersion)" />
     <LatestPackageReference Include="System.CodeDom" Version="$(SystemCodeDomPackageVersion)" />
-    <LatestPackageReference Include="System.ComponentModel.Annotations" Version="$(SystemComponentModelAnnotationsPackageVersion)" />
     <LatestPackageReference Include="System.Data.SqlClient" Version="$(SystemDataSqlClientPackageVersion)" />
-    <LatestPackageReference Include="System.Diagnostics.DiagnosticSource" Version="$(SystemDiagnosticsDiagnosticSourcePackageVersion)" />
     <LatestPackageReference Include="System.Diagnostics.EventLog" Version="$(SystemDiagnosticsEventLogPackageVersion)" />
     <LatestPackageReference Include="System.IdentityModel.Tokens.Jwt" Version="$(SystemIdentityModelTokensJwtPackageVersion)" />
     <LatestPackageReference Include="System.IO.Pipelines" Version="$(SystemIOPipelinesPackageVersion)" />
-    <LatestPackageReference Include="System.Memory" Version="$(SystemMemoryPackageVersion)" />
     <LatestPackageReference Include="System.Net.Http.WinHttpHandler" Version="$(SystemNetHttpWinHttpHandlerPackageVersion)" />
     <LatestPackageReference Include="System.Net.Http" Version="$(SystemNetHttpPackageVersion)" />
     <LatestPackageReference Include="System.Net.WebSockets.WebSocketProtocol" Version="$(SystemNetWebSocketsWebSocketProtocolPackageVersion)" />
-    <LatestPackageReference Include="System.Numerics.Vectors" Version="$(SystemNumericsVectorsPackageVersion)" />
     <LatestPackageReference Include="System.Reactive.Linq" Version="$(SystemReactiveLinqPackageVersion)" />
     <LatestPackageReference Include="System.Reflection.Metadata" Version="$(SystemReflectionMetadataPackageVersion)" />
     <LatestPackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="$(SystemRuntimeCompilerServicesUnsafePackageVersion)" />

+ 105 - 0
eng/SharedFramework.External.props

@@ -0,0 +1,105 @@
+<!--
+
+  This lists all assemblies which are part of the Microsoft.AspNetCore.App shared framework
+  and are built as packages in another repo.
+
+-->
+<Project>
+
+  <ItemGroup>
+    <!-- Dependencies from aspnet/Extensions -->
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.Caching.Abstractions"                    Version="$(MicrosoftExtensionsCachingAbstractionsPackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.Caching.Memory"                          Version="$(MicrosoftExtensionsCachingMemoryPackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.Configuration.Abstractions"              Version="$(MicrosoftExtensionsConfigurationAbstractionsPackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.Configuration.Binder"                    Version="$(MicrosoftExtensionsConfigurationBinderPackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.Configuration.CommandLine"               Version="$(MicrosoftExtensionsConfigurationCommandLinePackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables"      Version="$(MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.Configuration.FileExtensions"            Version="$(MicrosoftExtensionsConfigurationFileExtensionsPackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.Configuration.Ini"                       Version="$(MicrosoftExtensionsConfigurationIniPackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.Configuration.Json"                      Version="$(MicrosoftExtensionsConfigurationJsonPackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.Configuration.KeyPerFile"                Version="$(MicrosoftExtensionsConfigurationKeyPerFilePackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.Configuration.UserSecrets"               Version="$(MicrosoftExtensionsConfigurationUserSecretsPackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.Configuration.Xml"                       Version="$(MicrosoftExtensionsConfigurationXmlPackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.Configuration"                           Version="$(MicrosoftExtensionsConfigurationPackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.DependencyInjection.Abstractions"        Version="$(MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.DependencyInjection"                     Version="$(MicrosoftExtensionsDependencyInjectionPackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions"   Version="$(MicrosoftExtensionsDiagnosticsHealthChecksAbstractionsPackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.Diagnostics.HealthChecks"                Version="$(MicrosoftExtensionsDiagnosticsHealthChecksPackageVersion)"  />
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.FileProviders.Abstractions"              Version="$(MicrosoftExtensionsFileProvidersAbstractionsPackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.FileProviders.Composite"                 Version="$(MicrosoftExtensionsFileProvidersCompositePackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.FileProviders.Embedded"                  Version="$(MicrosoftExtensionsFileProvidersEmbeddedPackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.FileProviders.Physical"                  Version="$(MicrosoftExtensionsFileProvidersPhysicalPackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.FileSystemGlobbing"                      Version="$(MicrosoftExtensionsFileSystemGlobbingPackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.Hosting.Abstractions"                    Version="$(MicrosoftExtensionsHostingAbstractionsPackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.Hosting"                                 Version="$(MicrosoftExtensionsHostingPackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.Http"                                    Version="$(MicrosoftExtensionsHttpPackageVersion)"  />
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.Localization.Abstractions"               Version="$(MicrosoftExtensionsLocalizationAbstractionsPackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.Localization"                            Version="$(MicrosoftExtensionsLocalizationPackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.Logging.Abstractions"                    Version="$(MicrosoftExtensionsLoggingAbstractionsPackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.Logging.Configuration"                   Version="$(MicrosoftExtensionsLoggingConfigurationPackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.Logging.Console"                         Version="$(MicrosoftExtensionsLoggingConsolePackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.Logging.Debug"                           Version="$(MicrosoftExtensionsLoggingDebugPackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.Logging.EventSource"                     Version="$(MicrosoftExtensionsLoggingEventSourcePackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.Logging.TraceSource"                     Version="$(MicrosoftExtensionsLoggingTraceSourcePackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.Logging"                                 Version="$(MicrosoftExtensionsLoggingPackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.ObjectPool"                              Version="$(MicrosoftExtensionsObjectPoolPackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.Options.ConfigurationExtensions"         Version="$(MicrosoftExtensionsOptionsConfigurationExtensionsPackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.Options.DataAnnotations"                 Version="$(MicrosoftExtensionsOptionsDataAnnotationsPackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.Options"                                 Version="$(MicrosoftExtensionsOptionsPackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.Primitives"                              Version="$(MicrosoftExtensionsPrimitivesPackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.WebEncoders"                             Version="$(MicrosoftExtensionsWebEncodersPackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="Microsoft.JSInterop"                                          Version="$(MicrosoftJSInteropPackageVersion)" />
+
+    <!-- Dependencies from dotnet/corefx -->
+    <ExternalAspNetCoreAppReference Include="System.IO.Pipelines"                                          Version="$(SystemIOPipelinesPackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="System.Runtime.CompilerServices.Unsafe"                       Version="$(SystemRuntimeCompilerServicesUnsafePackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="System.Security.Cryptography.Xml"                             Version="$(SystemSecurityCryptographyXmlPackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="System.Text.Encodings.Web"                                    Version="$(SystemTextEncodingsWebPackageVersion)" />
+    <ExternalAspNetCoreAppReference Include="System.Threading.Channels"                                    Version="$(SystemThreadingChannelsPackageVersion)" />
+
+    <!-- Dependencies from dotnet/core-setup -->
+    <ExternalAspNetCoreAppReference Include="Microsoft.Extensions.DependencyModel"                         Version="$(MicrosoftExtensionsDependencyModelPackageVersion)" />
+
+    <!--
+      Transitive dependencies of other assemblies in the shared framework. These are listed separately and should not be included directly
+      when setting `<Reference>`. These are listed for the purpose of tests and servicing builds only.
+
+      If implementation details change and these assemblies are no longer showing up in the shared framework as a result of that,
+      it is okay to remove these transitive dependencies.
+
+      If these are needed as direct dependencies, it is okay to change them to ExternalAspNetCoreAppReference and move up into sections above.
+    -->
+    <_TransitiveExternalAspNetCoreAppReference Include="Microsoft.DotNet.PlatformAbstractions"              Version="$(MicrosoftDotNetPlatformAbstractionsPackageVersion)" />
+    <_TransitiveExternalAspNetCoreAppReference Include="Newtonsoft.Json"                                    Version="$(NewtonsoftJsonPackageVersion)" />
+    <_TransitiveExternalAspNetCoreAppReference Include="System.Security.Cryptography.Pkcs"                  Version="$(SystemSecurityCryptographyPkcsPackageVersion)" />
+    <_TransitiveExternalAspNetCoreAppReference Include="System.Security.Permissions"                        Version="$(SystemSecurityPermissionsPackageVersion)" />
+  </ItemGroup>
+
+  <ItemGroup Condition=" '$(IsServicingBuild)' == 'true' ">
+    <!--
+      Once we start to build a servicing release, hoist transitive dependencies to be direct dependencies.
+      This will help us ensure servicing builds carry the latest versions of dependencies, even if we aren't rebuilding
+      the original direct dependency that pulled in the transitive reference.
+    -->
+    <ExternalAspNetCoreAppReference Include="@(_TransitiveExternalAspNetCoreAppReference)" />
+  </ItemGroup>
+
+  <!--
+    These compilation references are necessary to compile netstandard2.0 assemblies which are in the shared framework.
+    This references are part of Microsoft.NETCore.App, so are listed here as references to be used during compilation only.
+  -->
+  <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
+    <_CompilationOnlyReference Include="System.Buffers" />
+  </ItemGroup>
+
+  <!--
+    These compilation references are necessary to workaround the mismatch of what is found in the ref pack for NETCore.App and what
+    is actually present at runtime. See https://github.com/dotnet/corefx/issues/34906
+  -->
+  <ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
+    <_CompilationOnlyReference Include="Microsoft.Win32.Registry" />
+    <_CompilationOnlyReference Include="System.Security.Cryptography.Cng" />
+    <_CompilationOnlyReference Include="System.Security.Principal.Windows" />
+  </ItemGroup>
+
+</Project>

+ 91 - 0
eng/SharedFramework.Local.props

@@ -0,0 +1,91 @@
+<!--
+  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 -->
+    <AspNetCoreAppReferenceAndPackage Include="Microsoft.AspNetCore.Http.Features" />
+    <AspNetCoreAppReferenceAndPackage Include="Microsoft.AspNetCore.Connections.Abstractions" />
+    <AspNetCoreAppReferenceAndPackage Include="Microsoft.AspNetCore.Http.Connections.Common" />
+    <AspNetCoreAppReferenceAndPackage Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" />
+    <AspNetCoreAppReferenceAndPackage Include="Microsoft.AspNetCore.SignalR.Common" />
+    <AspNetCoreAppReferenceAndPackage Include="Microsoft.AspNetCore.Components.Browser" />
+    <AspNetCoreAppReferenceAndPackage Include="Microsoft.AspNetCore.Components" />
+
+    <!-- These assemblies are only in the shared framework -->
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.DataProtection.Abstractions" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Cryptography.Internal" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Cryptography.KeyDerivation" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.DataProtection" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.DataProtection.Extensions" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Antiforgery" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Hosting.Abstractions" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Hosting" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Hosting.Server.Abstractions" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Authentication.Abstractions" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Authentication.Core" />
+    <AspNetCoreAppReference Include="Microsoft.Net.Http.Headers" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Http.Abstractions" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Http.Extensions" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Http" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Routing.Abstractions" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Routing" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.WebUtilities" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Html.Abstractions" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Identity" />
+    <AspNetCoreAppReference Include="Microsoft.Extensions.Identity.Core" />
+    <AspNetCoreAppReference Include="Microsoft.Extensions.Identity.Stores" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Server.HttpSys" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Server.IISIntegration" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Server.IIS" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Server.Kestrel.Core" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Server.Kestrel" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Authentication.Cookies" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Authentication" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Authentication.OAuth" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Authorization" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Authorization.Policy" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.CookiePolicy" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Cors" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Diagnostics.Abstractions" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Diagnostics" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Diagnostics.HealthChecks" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.HostFiltering" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.HttpOverrides" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.HttpsPolicy" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Localization.Routing" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Localization" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.ResponseCaching.Abstractions" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.ResponseCaching" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.ResponseCompression" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Rewrite" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Session" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.StaticFiles" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.WebSockets" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Razor.Runtime" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Razor" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Mvc.Abstractions" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Mvc.ApiExplorer" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Mvc.Core" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Mvc.Cors" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Mvc.DataAnnotations" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Mvc.Formatters.Json" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Mvc.Formatters.Xml" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Mvc.Localization" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Mvc.RazorPages" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Mvc.Razor" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Mvc.TagHelpers" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Mvc.ViewFeatures" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Mvc" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.Http.Connections" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.SignalR.Core" />
+    <AspNetCoreAppReference Include="Microsoft.AspNetCore.SignalR" />
+  </ItemGroup>
+</Project>

+ 0 - 12
eng/Version.Details.xml

@@ -289,18 +289,10 @@
       <Uri>https://github.com/dotnet/corefx</Uri>
       <Sha>c38c10d28e223aeea2f363a6ef0bf4a63d00a776</Sha>
     </Dependency>
-    <Dependency Name="System.ComponentModel.Annotations" Version="4.6.0-preview.19106.2">
-      <Uri>https://github.com/dotnet/corefx</Uri>
-      <Sha>c38c10d28e223aeea2f363a6ef0bf4a63d00a776</Sha>
-    </Dependency>
     <Dependency Name="System.Data.SqlClient" Version="4.7.0-preview.19106.2">
       <Uri>https://github.com/dotnet/corefx</Uri>
       <Sha>c38c10d28e223aeea2f363a6ef0bf4a63d00a776</Sha>
     </Dependency>
-    <Dependency Name="System.Diagnostics.DiagnosticSource" Version="4.6.0-preview.19106.2">
-      <Uri>https://github.com/dotnet/corefx</Uri>
-      <Sha>c38c10d28e223aeea2f363a6ef0bf4a63d00a776</Sha>
-    </Dependency>
     <Dependency Name="System.Diagnostics.EventLog" Version="4.6.0-preview.19106.2">
       <Uri>https://github.com/dotnet/corefx</Uri>
       <Sha>c38c10d28e223aeea2f363a6ef0bf4a63d00a776</Sha>
@@ -317,10 +309,6 @@
       <Uri>https://github.com/dotnet/corefx</Uri>
       <Sha>c38c10d28e223aeea2f363a6ef0bf4a63d00a776</Sha>
     </Dependency>
-    <Dependency Name="System.Numerics.Vectors" Version="4.6.0-preview.19106.2">
-      <Uri>https://github.com/dotnet/corefx</Uri>
-      <Sha>c38c10d28e223aeea2f363a6ef0bf4a63d00a776</Sha>
-    </Dependency>
     <Dependency Name="System.Reflection.Metadata" Version="1.7.0-preview.19106.2">
       <Uri>https://github.com/dotnet/corefx</Uri>
       <Sha>c38c10d28e223aeea2f363a6ef0bf4a63d00a776</Sha>

+ 0 - 4
eng/Versions.props

@@ -25,14 +25,11 @@
     <MicrosoftBclJsonSourcesPackageVersion>4.6.0-preview.19106.2</MicrosoftBclJsonSourcesPackageVersion>
     <MicrosoftCSharpPackageVersion>4.6.0-preview.19106.2</MicrosoftCSharpPackageVersion>
     <MicrosoftWin32RegistryPackageVersion>4.6.0-preview.19106.2</MicrosoftWin32RegistryPackageVersion>
-    <SystemComponentModelAnnotationsPackageVersion>4.6.0-preview.19106.2</SystemComponentModelAnnotationsPackageVersion>
     <SystemDataSqlClientPackageVersion>4.7.0-preview.19106.2</SystemDataSqlClientPackageVersion>
-    <SystemDiagnosticsDiagnosticSourcePackageVersion>4.6.0-preview.19106.2</SystemDiagnosticsDiagnosticSourcePackageVersion>
     <SystemDiagnosticsEventLogPackageVersion>4.6.0-preview.19106.2</SystemDiagnosticsEventLogPackageVersion>
     <SystemIOPipelinesPackageVersion>4.6.0-preview.19106.2</SystemIOPipelinesPackageVersion>
     <SystemNetHttpWinHttpHandlerPackageVersion>4.6.0-preview.19106.2</SystemNetHttpWinHttpHandlerPackageVersion>
     <SystemNetWebSocketsWebSocketProtocolPackageVersion>4.6.0-preview.19106.2</SystemNetWebSocketsWebSocketProtocolPackageVersion>
-    <SystemNumericsVectorsPackageVersion>4.6.0-preview.19106.2</SystemNumericsVectorsPackageVersion>
     <SystemReflectionMetadataPackageVersion>1.7.0-preview.19106.2</SystemReflectionMetadataPackageVersion>
     <SystemRuntimeCompilerServicesUnsafePackageVersion>4.6.0-preview.19106.2</SystemRuntimeCompilerServicesUnsafePackageVersion>
     <SystemSecurityCryptographyCngPackageVersion>4.6.0-preview.19106.2</SystemSecurityCryptographyCngPackageVersion>
@@ -136,7 +133,6 @@
     <!-- Stable dotnet/corefx packages no longer updated for .NET Core 3 -->
     <SystemBuffersPackageVersion>4.5.0</SystemBuffersPackageVersion>
     <SystemCodeDomPackageVersion>4.4.0</SystemCodeDomPackageVersion>
-    <SystemMemoryPackageVersion>4.5.2</SystemMemoryPackageVersion>
     <SystemNetHttpPackageVersion>4.3.2</SystemNetHttpPackageVersion>
     <SystemThreadingTasksExtensionsPackageVersion>4.5.2</SystemThreadingTasksExtensionsPackageVersion>
     <!-- Packages developed by @aspnet, but manually updated as necessary. -->

+ 41 - 0
eng/targets/ResolveReferences.targets

@@ -58,6 +58,18 @@
 
     <_UnusedProjectReferenceProvider Include="@(ProjectReferenceProvider)" Exclude="@(Reference)" />
 
+    <_CompilationOnlyReference Condition="'$(TargetFramework)' == 'netstandard2.0'" Include="@(Reference->WithMetadataValue('NuGetPackageId','NETStandard.Library'))" />
+
+    <_InvalidReferenceToNonSharedFxAssembly Condition="'$(IsAspNetCoreApp)' == 'true'"
+      Include="@(Reference)"
+      Exclude="
+        Newtonsoft.Json;
+        @(AspNetCoreAppReference);
+        @(AspNetCoreAppReferenceAndPackage);
+        @(ExternalAspNetCoreAppReference);
+        @(_CompilationOnlyReference)" />
+    <!-- TODO: remove Newtonsoft.Json from this list once https://github.com/aspnet/AspNetCore/issues/4260 is resolved -->
+
     <!--
       Turn Reference items into a ProjectReference when UseProjectReferences is true.
       Order matters. This comes before package resolution because projects should be used when possible instead of packages.
@@ -75,6 +87,27 @@
     <Reference Remove="@(Reference)" />
   </ItemGroup>
 
+  <ItemDefinitionGroup>
+    <Reference>
+      <SharedSources>false</SharedSources>
+    </Reference>
+  </ItemDefinitionGroup>
+
+  <!--
+    This target resolves remaining Referene items to Packages, if possible. If not, they are left as Reference items fo the SDK to resolve.
+    This target helps ensure projects within the shared framework do no unintentionally add new references,
+    and that assemblies outside the shared framework reference the framework as a whole instead of using
+    individual assemblies.
+  -->
+  <Target Name="_CheckForReferenceBoundaries" BeforeTargets="CollectPackageReferences;ResolveReferences">
+
+    <Error Condition="@(_InvalidReferenceToSharedFxOnlyAssembly->Count()) != 0"
+           Text="Cannot reference &quot;%(_InvalidReferenceToSharedFxOnlyAssembly.Identity)&quot; directly because it is part of the shared framework and this project is not. Use &lt;FrameworkReference Include=&quot;Microsoft.AspNetCore.App&quot; /&gt; instead." />
+
+    <Error Condition="@(_InvalidReferenceToNonSharedFxAssembly->Count()) != 0 AND '%(_InvalidReferenceToNonSharedFxAssembly.SharedSources)' != 'true'"
+           Text="Cannot reference &quot;%(_InvalidReferenceToNonSharedFxAssembly.Identity)&quot;. This dependency is not in the shared framework. See docs/SharedFramework.md for instructions on how to modify what is in the shared framework." />
+  </Target>
+
   <!--
     This target resolves remaining Referene items to Packages, if possible. If not, they are left as Reference items fo the SDK to resolve.
     This executes on NuGet restore and during DesignTimeBuild. It should not run in the outer, cross-targeting build.
@@ -84,6 +117,12 @@
       <Reference Include="@(_ReferenceTemp)" />
       <_ReferenceTemp Remove="@(_ReferenceTemp)" />
 
+      <!-- Ensure only content asset are consumed from .Sources packages -->
+      <Reference>
+        <IncludeAssets Condition="'%(SharedSources)' == 'true'">ContentFiles</IncludeAssets>
+        <PrivateAssets Condition="'%(SharedSources)' == 'true'">All</PrivateAssets>
+      </Reference>
+
       <!-- Identify if any references were present in the last release of this package, but have been removed. -->
       <UnusedBaselinePackageReference Include="@(BaselinePackageReference)" Exclude="@(Reference);@(_ProjectReferenceByAssemblyName);@(PackageReference)" />
 
@@ -165,6 +204,8 @@
   <Target Name="_GetReferencesProvided" Returns="@(ProvidesReference)">
     <ItemGroup Condition=" '$(IsProjectReferenceProvider)' == 'true' ">
       <ProvidesReference Include="$(AssemblyName)">
+        <IsAspNetCoreApp>$([MSBuild]::ValueOrDefault($(IsAspNetCoreApp),'false'))</IsAspNetCoreApp>
+        <IsShippingPackage>$([MSBuild]::ValueOrDefault($(IsShippingPackage),'false'))</IsShippingPackage>
         <ProjectFileRelativePath>$([MSBuild]::MakeRelative($(RepositoryRoot), $(MSBuildProjectFullPath)))</ProjectFileRelativePath>
       </ProvidesReference>
     </ItemGroup>

+ 1 - 0
src/Antiforgery/src/Microsoft.AspNetCore.Antiforgery.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>An antiforgery system for ASP.NET Core designed to generate and validate tokens to prevent Cross-Site Request Forgery attacks.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;antiforgery</PackageTags>

+ 1 - 0
src/Components/Browser/src/Microsoft.AspNetCore.Components.Browser.csproj

@@ -2,6 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <Description>Support for rendering ASP.NET Core components for browsers.</Description>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <IsShippingPackage>true</IsShippingPackage>

+ 1 - 0
src/Components/Components/src/Microsoft.AspNetCore.Components.csproj

@@ -5,6 +5,7 @@
     <Description>Components feature for ASP.NET Core.</Description>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <IsShippingPackage>true</IsShippingPackage>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
   </PropertyGroup>
 
   <ItemGroup>

+ 1 - 0
src/DataProtection/Abstractions/src/Microsoft.AspNetCore.DataProtection.Abstractions.csproj

@@ -6,6 +6,7 @@ Commonly used types:
 Microsoft.AspNetCore.DataProtection.IDataProtectionProvider
 Microsoft.AspNetCore.DataProtection.IDataProtector</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;dataprotection</PackageTags>
   </PropertyGroup>

+ 1 - 0
src/DataProtection/Cryptography.Internal/src/Microsoft.AspNetCore.Cryptography.Internal.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>Infrastructure for ASP.NET Core cryptographic packages. Applications and libraries should not reference this package directly.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>

+ 1 - 0
src/DataProtection/Cryptography.KeyDerivation/src/Microsoft.AspNetCore.Cryptography.KeyDerivation.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core utilities for key derivation.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;dataprotection</PackageTags>

+ 1 - 0
src/DataProtection/DataProtection/src/Microsoft.AspNetCore.DataProtection.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core logic to protect and unprotect data, similar to DPAPI.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>

+ 1 - 0
src/DataProtection/Extensions/src/Microsoft.AspNetCore.DataProtection.Extensions.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>Additional APIs for ASP.NET Core data protection.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;dataprotection</PackageTags>
   </PropertyGroup>

+ 1 - 0
src/DefaultBuilder/src/Microsoft.AspNetCore.csproj

@@ -2,6 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <PackageTags>aspnetcore</PackageTags>
     <Description>Microsoft.AspNetCore</Description>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>

+ 0 - 158
src/Framework/Microsoft.AspNetCore.App.props

@@ -1,158 +0,0 @@
-<!--
-  This lists all assemblies which are part of the Microsoft.AspNetCore.App metapackage and shared framework.
--->
-<Project>
-
-  <ItemGroup>
-    <Dependency Include="Microsoft.AspNetCore.Antiforgery" />
-    <Dependency Include="Microsoft.AspNetCore.Authentication.Abstractions" />
-    <Dependency Include="Microsoft.AspNetCore.Authentication.Cookies" />
-    <Dependency Include="Microsoft.AspNetCore.Authentication.Core" />
-    <Dependency Include="Microsoft.AspNetCore.Authentication.OAuth" />
-    <Dependency Include="Microsoft.AspNetCore.Authentication" />
-    <Dependency Include="Microsoft.AspNetCore.Authorization.Policy" />
-    <Dependency Include="Microsoft.AspNetCore.Authorization" />
-    <Dependency Include="Microsoft.AspNetCore.Components.Browser" />
-    <Dependency Include="Microsoft.AspNetCore.Components" />
-    <Dependency Include="Microsoft.AspNetCore.Connections.Abstractions" />
-    <Dependency Include="Microsoft.AspNetCore.CookiePolicy" />
-    <Dependency Include="Microsoft.AspNetCore.Cors" />
-    <Dependency Include="Microsoft.AspNetCore.Cryptography.Internal" />
-    <Dependency Include="Microsoft.AspNetCore.Cryptography.KeyDerivation" />
-    <Dependency Include="Microsoft.AspNetCore.DataProtection.Abstractions" />
-    <Dependency Include="Microsoft.AspNetCore.DataProtection.Extensions" />
-    <Dependency Include="Microsoft.AspNetCore.DataProtection" />
-    <Dependency Include="Microsoft.AspNetCore.Diagnostics.Abstractions" />
-    <Dependency Include="Microsoft.AspNetCore.Diagnostics.HealthChecks" />
-    <Dependency Include="Microsoft.AspNetCore.Diagnostics" />
-    <Dependency Include="Microsoft.AspNetCore.HostFiltering" />
-    <Dependency Include="Microsoft.AspNetCore.Hosting.Abstractions" />
-    <Dependency Include="Microsoft.AspNetCore.Hosting.Server.Abstractions" />
-    <Dependency Include="Microsoft.AspNetCore.Hosting" />
-    <Dependency Include="Microsoft.AspNetCore.Html.Abstractions" />
-    <Dependency Include="Microsoft.AspNetCore.Http.Abstractions" />
-    <Dependency Include="Microsoft.AspNetCore.Http.Connections.Common" />
-    <Dependency Include="Microsoft.AspNetCore.Http.Connections" />
-    <Dependency Include="Microsoft.AspNetCore.Http.Extensions" />
-    <Dependency Include="Microsoft.AspNetCore.Http.Features" />
-    <Dependency Include="Microsoft.AspNetCore.Http" />
-    <Dependency Include="Microsoft.AspNetCore.HttpOverrides" />
-    <Dependency Include="Microsoft.AspNetCore.HttpsPolicy" />
-    <Dependency Include="Microsoft.AspNetCore.Identity" />
-    <Dependency Include="Microsoft.AspNetCore.Localization.Routing" />
-    <Dependency Include="Microsoft.AspNetCore.Localization" />
-    <Dependency Include="Microsoft.AspNetCore.Mvc.Abstractions" />
-    <Dependency Include="Microsoft.AspNetCore.Mvc.ApiExplorer" />
-    <Dependency Include="Microsoft.AspNetCore.Mvc.Core" />
-    <Dependency Include="Microsoft.AspNetCore.Mvc.Cors" />
-    <Dependency Include="Microsoft.AspNetCore.Mvc.DataAnnotations" />
-    <Dependency Include="Microsoft.AspNetCore.Mvc.Formatters.Json" />
-    <Dependency Include="Microsoft.AspNetCore.Mvc.Formatters.Xml" />
-    <Dependency Include="Microsoft.AspNetCore.Mvc.Localization" />
-    <Dependency Include="Microsoft.AspNetCore.Mvc.Razor" />
-    <Dependency Include="Microsoft.AspNetCore.Mvc.RazorPages" />
-    <Dependency Include="Microsoft.AspNetCore.Mvc.TagHelpers" />
-    <Dependency Include="Microsoft.AspNetCore.Mvc.ViewFeatures" />
-    <Dependency Include="Microsoft.AspNetCore.Mvc" />
-    <Dependency Include="Microsoft.AspNetCore.Razor.Runtime" />
-    <Dependency Include="Microsoft.AspNetCore.Razor" />
-    <Dependency Include="Microsoft.AspNetCore.ResponseCaching.Abstractions" />
-    <Dependency Include="Microsoft.AspNetCore.ResponseCaching" />
-    <Dependency Include="Microsoft.AspNetCore.ResponseCompression" />
-    <Dependency Include="Microsoft.AspNetCore.Rewrite" />
-    <Dependency Include="Microsoft.AspNetCore.Routing.Abstractions" />
-    <Dependency Include="Microsoft.AspNetCore.Routing" />
-    <Dependency Include="Microsoft.AspNetCore.Server.HttpSys" />
-    <Dependency Include="Microsoft.AspNetCore.Server.IIS" />
-    <Dependency Include="Microsoft.AspNetCore.Server.IISIntegration" />
-    <Dependency Include="Microsoft.AspNetCore.Server.Kestrel.Core" />
-    <Dependency Include="Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions" />
-    <Dependency Include="Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets" />
-    <Dependency Include="Microsoft.AspNetCore.Server.Kestrel" />
-    <Dependency Include="Microsoft.AspNetCore.Session" />
-    <Dependency Include="Microsoft.AspNetCore.SignalR.Common" />
-    <Dependency Include="Microsoft.AspNetCore.SignalR.Core" />
-    <Dependency Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" />
-    <Dependency Include="Microsoft.AspNetCore.SignalR" />
-    <Dependency Include="Microsoft.AspNetCore.StaticFiles" />
-    <Dependency Include="Microsoft.AspNetCore.WebSockets" />
-    <Dependency Include="Microsoft.AspNetCore.WebUtilities" />
-    <Dependency Include="Microsoft.AspNetCore" />
-    <Dependency Include="Microsoft.Extensions.Identity.Core" />
-    <Dependency Include="Microsoft.Extensions.Identity.Stores" />
-    <Dependency Include="Microsoft.Net.Http.Headers" />
-
-    <!-- We still be the shared framework but running restore against packages we just built. This sets the version to match the current build number. -->
-    <Dependency Update="@(Dependency)" Version="$(PackageVersion)" />
-
-    <!-- Dependencies built as packages in other repos that we definitely want in the shared framework. -->
-    <ExternalDependency Include="Microsoft.Extensions.Caching.Abstractions"                    Version="$(MicrosoftExtensionsCachingAbstractionsPackageVersion)" />
-    <ExternalDependency Include="Microsoft.Extensions.Caching.Memory"                          Version="$(MicrosoftExtensionsCachingMemoryPackageVersion)" />
-    <ExternalDependency Include="Microsoft.Extensions.Configuration.Abstractions"              Version="$(MicrosoftExtensionsConfigurationAbstractionsPackageVersion)" />
-    <ExternalDependency Include="Microsoft.Extensions.Configuration.Binder"                    Version="$(MicrosoftExtensionsConfigurationBinderPackageVersion)" />
-    <ExternalDependency Include="Microsoft.Extensions.Configuration.CommandLine"               Version="$(MicrosoftExtensionsConfigurationCommandLinePackageVersion)" />
-    <ExternalDependency Include="Microsoft.Extensions.Configuration.EnvironmentVariables"      Version="$(MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion)" />
-    <ExternalDependency Include="Microsoft.Extensions.Configuration.FileExtensions"            Version="$(MicrosoftExtensionsConfigurationFileExtensionsPackageVersion)" />
-    <ExternalDependency Include="Microsoft.Extensions.Configuration.Ini"                       Version="$(MicrosoftExtensionsConfigurationIniPackageVersion)" />
-    <ExternalDependency Include="Microsoft.Extensions.Configuration.Json"                      Version="$(MicrosoftExtensionsConfigurationJsonPackageVersion)" />
-    <ExternalDependency Include="Microsoft.Extensions.Configuration.KeyPerFile"                Version="$(MicrosoftExtensionsConfigurationKeyPerFilePackageVersion)" />
-    <ExternalDependency Include="Microsoft.Extensions.Configuration.UserSecrets"               Version="$(MicrosoftExtensionsConfigurationUserSecretsPackageVersion)" />
-    <ExternalDependency Include="Microsoft.Extensions.Configuration.Xml"                       Version="$(MicrosoftExtensionsConfigurationXmlPackageVersion)" />
-    <ExternalDependency Include="Microsoft.Extensions.Configuration"                           Version="$(MicrosoftExtensionsConfigurationPackageVersion)" />
-    <ExternalDependency Include="Microsoft.Extensions.DependencyInjection.Abstractions"        Version="$(MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion)" />
-    <ExternalDependency Include="Microsoft.Extensions.DependencyInjection"                     Version="$(MicrosoftExtensionsDependencyInjectionPackageVersion)" />
-    <ExternalDependency Include="Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions"   Version="$(MicrosoftExtensionsDiagnosticsHealthChecksAbstractionsPackageVersion)" />
-    <ExternalDependency Include="Microsoft.Extensions.Diagnostics.HealthChecks"                Version="$(MicrosoftExtensionsDiagnosticsHealthChecksPackageVersion)"  />
-    <ExternalDependency Include="Microsoft.Extensions.FileProviders.Abstractions"              Version="$(MicrosoftExtensionsFileProvidersAbstractionsPackageVersion)" />
-    <ExternalDependency Include="Microsoft.Extensions.FileProviders.Composite"                 Version="$(MicrosoftExtensionsFileProvidersCompositePackageVersion)" />
-    <ExternalDependency Include="Microsoft.Extensions.FileProviders.Embedded"                  Version="$(MicrosoftExtensionsFileProvidersEmbeddedPackageVersion)" />
-    <ExternalDependency Include="Microsoft.Extensions.FileProviders.Physical"                  Version="$(MicrosoftExtensionsFileProvidersPhysicalPackageVersion)" />
-    <ExternalDependency Include="Microsoft.Extensions.FileSystemGlobbing"                      Version="$(MicrosoftExtensionsFileSystemGlobbingPackageVersion)" />
-    <ExternalDependency Include="Microsoft.Extensions.Hosting.Abstractions"                    Version="$(MicrosoftExtensionsHostingAbstractionsPackageVersion)" />
-    <ExternalDependency Include="Microsoft.Extensions.Hosting"                                 Version="$(MicrosoftExtensionsHostingPackageVersion)" />
-    <ExternalDependency Include="Microsoft.Extensions.Http"                                    Version="$(MicrosoftExtensionsHttpPackageVersion)"  />
-    <ExternalDependency Include="Microsoft.Extensions.Localization.Abstractions"               Version="$(MicrosoftExtensionsLocalizationAbstractionsPackageVersion)" />
-    <ExternalDependency Include="Microsoft.Extensions.Localization"                            Version="$(MicrosoftExtensionsLocalizationPackageVersion)" />
-    <ExternalDependency Include="Microsoft.Extensions.Logging.Abstractions"                    Version="$(MicrosoftExtensionsLoggingAbstractionsPackageVersion)" />
-    <ExternalDependency Include="Microsoft.Extensions.Logging.Configuration"                   Version="$(MicrosoftExtensionsLoggingConfigurationPackageVersion)" />
-    <ExternalDependency Include="Microsoft.Extensions.Logging.Console"                         Version="$(MicrosoftExtensionsLoggingConsolePackageVersion)" />
-    <ExternalDependency Include="Microsoft.Extensions.Logging.Debug"                           Version="$(MicrosoftExtensionsLoggingDebugPackageVersion)" />
-    <ExternalDependency Include="Microsoft.Extensions.Logging.EventSource"                     Version="$(MicrosoftExtensionsLoggingEventSourcePackageVersion)" />
-    <ExternalDependency Include="Microsoft.Extensions.Logging.TraceSource"                     Version="$(MicrosoftExtensionsLoggingTraceSourcePackageVersion)" />
-    <ExternalDependency Include="Microsoft.Extensions.Logging"                                 Version="$(MicrosoftExtensionsLoggingPackageVersion)" />
-    <ExternalDependency Include="Microsoft.Extensions.ObjectPool"                              Version="$(MicrosoftExtensionsObjectPoolPackageVersion)" />
-    <ExternalDependency Include="Microsoft.Extensions.Options.ConfigurationExtensions"         Version="$(MicrosoftExtensionsOptionsConfigurationExtensionsPackageVersion)" />
-    <ExternalDependency Include="Microsoft.Extensions.Options.DataAnnotations"                 Version="$(MicrosoftExtensionsOptionsDataAnnotationsPackageVersion)" />
-    <ExternalDependency Include="Microsoft.Extensions.Options"                                 Version="$(MicrosoftExtensionsOptionsPackageVersion)" />
-    <ExternalDependency Include="Microsoft.Extensions.Primitives"                              Version="$(MicrosoftExtensionsPrimitivesPackageVersion)" />
-    <ExternalDependency Include="Microsoft.Extensions.WebEncoders"                             Version="$(MicrosoftExtensionsWebEncodersPackageVersion)" />
-    <ExternalDependency Include="Microsoft.JSInterop"                                          Version="$(MicrosoftJSInteropPackageVersion)" />
-
-    <!--
-      Transitive dependencies of other assemblies in the shared framework. These are listed separately and should not be included directly
-      when setting `<Reference>`. These are listed for the purpose of tests and servicing builds only.
-      If implementation details change and these assemblies are no longer showing up in the shared framework as a result of that,
-      it is okay to remove these transitive dependencies.
-    -->
-    <_TransitiveExternalDependency Include="Microsoft.DotNet.PlatformAbstractions"              Version="$(MicrosoftDotNetPlatformAbstractionsPackageVersion)" />
-    <_TransitiveExternalDependency Include="Microsoft.Extensions.DependencyModel"               Version="$(MicrosoftExtensionsDependencyModelPackageVersion)" />
-    <_TransitiveExternalDependency Include="Newtonsoft.Json"                                    Version="$(NewtonsoftJsonPackageVersion)" />
-    <_TransitiveExternalDependency Include="System.IO.Pipelines"                                Version="$(SystemIOPipelinesPackageVersion)" />
-    <_TransitiveExternalDependency Include="System.Runtime.CompilerServices.Unsafe"             Version="$(SystemRuntimeCompilerServicesUnsafePackageVersion)" />
-    <_TransitiveExternalDependency Include="System.Security.Cryptography.Pkcs"                  Version="$(SystemSecurityCryptographyPkcsPackageVersion)" />
-    <_TransitiveExternalDependency Include="System.Security.Cryptography.Xml"                   Version="$(SystemSecurityCryptographyXmlPackageVersion)" />
-    <_TransitiveExternalDependency Include="System.Security.Permissions"                        Version="$(SystemSecurityPermissionsPackageVersion)" />
-    <_TransitiveExternalDependency Include="System.Text.Encodings.Web"                          Version="$(SystemTextEncodingsWebPackageVersion)" />
-    <_TransitiveExternalDependency Include="System.Threading.Channels"                          Version="$(SystemThreadingChannelsPackageVersion)" />
-  </ItemGroup>
-
-  <ItemGroup Condition=" '$(IsServicingBuild)' == 'true' ">
-    <!--
-      Once we start to build a servicing release, hoist transitive dependencies to be direct dependencies.
-      This will help us ensure servicing builds carry the latest versions of dependencies, even if we aren't rebuilding
-      the original direct dependency that pulled in the transitive reference.
-    -->
-    <ExternalDependency Include="@(_TransitiveExternalDependency)" />
-  </ItemGroup>
-
-</Project>

+ 9 - 4
src/Framework/pkg/Metapackage.targets

@@ -30,8 +30,12 @@
       <AllowExplicitVersion>true</AllowExplicitVersion>
     </PackageReference>
 
-    <!-- Note: do not add _TransitiveExternalDependency to this list. This is intentionally not listed as a direct package reference. -->
-    <PackageReference Include="@(Dependency);@(ExternalDependency)" />
+    <!-- Add version metadata. These are expected to match the metapackage version. -->
+    <AspNetCoreAppReferenceAndPackage Update="@(AspNetCoreAppReferenceAndPackage)" Version="$(SharedFxVersion)" />
+    <AspNetCoreAppReference Update="@(AspNetCoreAppReference)" Version="$(SharedFxVersion)" />
+
+    <!-- Note: do not add _TransitiveExternalAspNetCoreAppReference to this list. This is intentionally not listed as a direct package reference. -->
+    <PackageReference Include="@(AspNetCoreAppReference);@(AspNetCoreAppReferenceAndPackage);@(ExternalAspNetCoreAppReference)" />
   </ItemGroup>
 
   <ItemDefinitionGroup>
@@ -71,8 +75,9 @@
   <Target Name="GenerateBuildProps" BeforeTargets="BeforeBuild" DependsOnTargets="PrepareOutputPaths">
 
     <ItemGroup>
-      <_AspNetAppPackageConflictOverrides Include="@(Dependency->'%(Identity)|%(Version)')" Condition=" '%(Dependency.Version)' != '' " />
-      <_AspNetAppPackageConflictOverrides Include="@(ExternalDependency->'%(Identity)|%(Version)')" Condition=" '%(ExternalDependency.Version)' != '' " />
+      <_AspNetAppPackageConflictOverrides Include="@(AspNetCoreAppReference->'%(Identity)|%(Version)')" Condition=" '%(AspNetCoreAppReference.Version)' != '' " />
+      <_AspNetAppPackageConflictOverrides Include="@(AspNetCoreAppReferenceAndPackage->'%(Identity)|%(Version)')" Condition=" '%(AspNetCoreAppReferenceAndPackage.Version)' != '' " />
+      <_AspNetAppPackageConflictOverrides Include="@(ExternalAspNetCoreAppReference->'%(Identity)|%(Version)')" Condition=" '%(ExternalAspNetCoreAppReference.Version)' != '' " />
     </ItemGroup>
 
     <PropertyGroup>

+ 0 - 2
src/Framework/pkg/Microsoft.AspNetCore.App.pkgproj

@@ -32,8 +32,6 @@ This package requires the ASP.NET Core runtime. This runtime is installed by the
     </ProjectReference>
   </ItemGroup>
 
-  <Import Project="..\Microsoft.AspNetCore.App.props" />
-
   <Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
   <Import Project="Metapackage.targets" />
 </Project>

+ 2 - 3
src/Framework/ref/Microsoft.AspNetCore.App.Ref.csproj

@@ -7,7 +7,6 @@
   </PropertyGroup>
 
   <Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
-  <Import Project="..\Microsoft.AspNetCore.App.props" />
 
   <PropertyGroup>
     <TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
@@ -39,8 +38,8 @@ This package is an internal implementation of the .NET Core SDK and is not meant
   </PropertyGroup>
 
   <ItemGroup>
-    <!-- Note: do not add _TransitiveExternalDependency to this list. This is intentionally not listed as a direct package reference. -->
-    <Reference Include="@(Dependency);@(ExternalDependency)" />
+    <!-- Note: do not add _TransitiveExternalAspNetCoreAppReference to this list. This is intentionally not listed as a direct package reference. -->
+    <Reference Include="@(AspNetCoreAppReference);@(AspNetCoreAppReferenceAndPackage);@(ExternalAspNetCoreAppReference)" />
   </ItemGroup>
 
   <Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />

+ 0 - 2
src/Framework/src/Microsoft.AspNetCore.App.shfxproj

@@ -52,8 +52,6 @@ $(MSBuildProjectName) provides a default set of APIs for building an ASP.NET Cor
     <NoPackageAnalysis>true</NoPackageAnalysis>
   </PropertyGroup>
 
-  <Import Project="..\Microsoft.AspNetCore.App.props" />
-
   <Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
   <Import Project="SharedFx.targets" />
 

+ 6 - 2
src/Framework/src/SharedFx.targets

@@ -139,8 +139,12 @@ This targets file should only be imported by .shfxproj files.
       <AllowExplicitVersion>true</AllowExplicitVersion>
     </PackageReference>
 
-    <!-- Note: do not add _TransitiveExternalDependency to this list. This is intentionally not listed as a direct package reference. -->
-    <PackageReference Include="@(Dependency);@(ExternalDependency)">
+    <!-- Add version metadata. These are expected to match the metapackage version. -->
+    <AspNetCoreAppReferenceAndPackage Update="@(AspNetCoreAppReferenceAndPackage)" Version="$(SharedFxVersion)" />
+    <AspNetCoreAppReference Update="@(AspNetCoreAppReference)" Version="$(SharedFxVersion)" />
+
+    <!-- Note: do not add _TransitiveExternalAspNetCoreAppReference to this list. This is intentionally not listed as a direct package reference. -->
+    <PackageReference Include="@(AspNetCoreAppReference);@(AspNetCoreAppReferenceAndPackage);@(ExternalAspNetCoreAppReference)">
       <IncludeAssets>Runtime;Native</IncludeAssets>
       <Publish>true</Publish>
     </PackageReference>

+ 1 - 3
src/Framework/test/Microsoft.AspNetCore.App.UnitTests.csproj

@@ -5,8 +5,6 @@
     <RootNamespace>Microsoft.AspNetCore</RootNamespace>
   </PropertyGroup>
 
-  <Import Project="..\Microsoft.AspNetCore.App.props" />
-
   <ItemGroup>
     <AssemblyAttribute Include="Microsoft.AspNetCore.TestData">
       <_Parameter1>PackageVersion</_Parameter1>
@@ -41,7 +39,7 @@
     <ItemGroup>
       <AssemblyAttribute Include="Microsoft.AspNetCore.TestData">
         <_Parameter1>SharedFxDependencies</_Parameter1>
-        <_Parameter2>@(Dependency);@(ExternalDependency);@(_TransitiveExternalDependency)</_Parameter2>
+        <_Parameter2>@(AspNetCoreAppReference);@(AspNetCoreAppReferenceAndPackage);@(ExternalAspNetCoreAppReference);@(_TransitiveExternalAspNetCoreAppReference)</_Parameter2>
       </AssemblyAttribute>
       <AssemblyAttribute Include="Microsoft.AspNetCore.TestData">
         <_Parameter1>MetadataOutputPath</_Parameter1>

+ 1 - 0
src/Hosting/Abstractions/src/Microsoft.AspNetCore.Hosting.Abstractions.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core hosting and startup abstractions for web applications.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;hosting</PackageTags>

+ 2 - 3
src/Hosting/Hosting/src/Microsoft.AspNetCore.Hosting.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core hosting infrastructure and startup logic for web applications.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;hosting</PackageTags>
@@ -25,9 +26,7 @@
     <Reference Include="Microsoft.Extensions.Hosting.Abstractions" />
     <Reference Include="Microsoft.Extensions.Logging" />
     <Reference Include="Microsoft.Extensions.Options" />
-    <Reference Include="Microsoft.Extensions.TypeNameHelper.Sources" PrivateAssets="All" />
-    <Reference Include="System.Diagnostics.DiagnosticSource" />
-    <Reference Include="System.Reflection.Metadata" />
+    <Reference Include="Microsoft.Extensions.TypeNameHelper.Sources" SharedSources="true" />
   </ItemGroup>
 
 </Project>

+ 1 - 0
src/Hosting/Server.Abstractions/src/Microsoft.AspNetCore.Hosting.Server.Abstractions.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core hosting server abstractions for web applications.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;hosting</PackageTags>

+ 1 - 0
src/Html/Abstractions/src/Microsoft.AspNetCore.Html.Abstractions.csproj

@@ -7,6 +7,7 @@ Commonly used types:
 Microsoft.AspNetCore.Html.HtmlString
 Microsoft.AspNetCore.Html.IHtmlContent</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore</PackageTags>
   </PropertyGroup>

+ 2 - 1
src/Http/Authentication.Abstractions/src/Microsoft.AspNetCore.Authentication.Abstractions.csproj

@@ -2,6 +2,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core common types used by the various authentication components.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;authentication;security</PackageTags>
@@ -14,4 +15,4 @@
     <Reference Include="Microsoft.Extensions.Options" />
   </ItemGroup>
 
-</Project>
+</Project>

+ 1 - 0
src/Http/Authentication.Core/src/Microsoft.AspNetCore.Authentication.Core.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core common types used by the various authentication middleware components.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;authentication;security</PackageTags>

+ 1 - 1
src/Http/Headers/src/Microsoft.Net.Http.Headers.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>HTTP header parser implementations.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
@@ -11,7 +12,6 @@
 
   <ItemGroup>
     <Reference Include="Microsoft.Extensions.Primitives" />
-    <Reference Include="System.Buffers" />
   </ItemGroup>
 
 </Project>

+ 2 - 1
src/Http/Http.Abstractions/src/Microsoft.AspNetCore.Http.Abstractions.csproj

@@ -9,6 +9,7 @@ Microsoft.AspNetCore.Http.HttpContext
 Microsoft.AspNetCore.Http.HttpRequest
 Microsoft.AspNetCore.Http.HttpResponse</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore</PackageTags>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
@@ -20,7 +21,7 @@ Microsoft.AspNetCore.Http.HttpResponse</Description>
 
   <ItemGroup>
     <Reference Include="Microsoft.AspNetCore.Http.Features" />
-    <Reference Include="Microsoft.Extensions.ActivatorUtilities.Sources" PrivateAssets="All" />
+    <Reference Include="Microsoft.Extensions.ActivatorUtilities.Sources" SharedSources="true" />
     <Reference Include="System.Text.Encodings.Web" />
   </ItemGroup>
 

+ 1 - 1
src/Http/Http.Extensions/src/Microsoft.AspNetCore.Http.Extensions.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core common extension methods for HTTP abstractions, HTTP headers, HTTP request/response, and session state.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore</PackageTags>
@@ -12,7 +13,6 @@
     <Reference Include="Microsoft.AspNetCore.Http.Abstractions" />
     <Reference Include="Microsoft.Net.Http.Headers" />
     <Reference Include="Microsoft.Extensions.FileProviders.Abstractions" />
-    <Reference Include="System.Buffers" />
   </ItemGroup>
 
 </Project>

+ 1 - 0
src/Http/Http.Features/src/Microsoft.AspNetCore.Http.Features.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core HTTP feature interface definitions.</Description>
     <TargetFramework>netstandard2.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore</PackageTags>

+ 1 - 0
src/Http/Http/src/Microsoft.AspNetCore.Http.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core default HTTP feature implementations.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>

+ 1 - 0
src/Http/Routing.Abstractions/src/Microsoft.AspNetCore.Routing.Abstractions.csproj

@@ -6,6 +6,7 @@ Commonly used types:
 Microsoft.AspNetCore.Routing.IRouter
 Microsoft.AspNetCore.Routing.RouteData</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;routing</PackageTags>

+ 2 - 1
src/Http/Routing/src/Microsoft.AspNetCore.Routing.csproj

@@ -6,6 +6,7 @@ Commonly used types:
 Microsoft.AspNetCore.Routing.Route
 Microsoft.AspNetCore.Routing.RouteCollection</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;routing</PackageTags>
@@ -27,7 +28,7 @@ Microsoft.AspNetCore.Routing.RouteCollection</Description>
   <ItemGroup>
     <Reference Include="Microsoft.AspNetCore.Http.Extensions" />
     <Reference Include="Microsoft.AspNetCore.Routing.Abstractions" />
-    <Reference Include="Microsoft.Extensions.HashCodeCombiner.Sources" PrivateAssets="All" />
+    <Reference Include="Microsoft.Extensions.HashCodeCombiner.Sources" SharedSources="true" />
     <Reference Include="Microsoft.Extensions.Logging.Abstractions" />
     <Reference Include="Microsoft.Extensions.ObjectPool" />
     <Reference Include="Microsoft.Extensions.Options" />

+ 1 - 0
src/Http/WebUtilities/src/Microsoft.AspNetCore.WebUtilities.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core utilities, such as for working with forms, multipart messages, and query strings.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <DefineConstants>$(DefineConstants);WebEncoders_In_WebUtilities</DefineConstants>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>

+ 1 - 0
src/Identity/Core/src/Microsoft.AspNetCore.Identity.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core Identity is the membership system for building ASP.NET Core web applications, including membership, login, and user data. ASP.NET Core Identity allows you to add login features to your application and makes it easy to customize data about the logged in user.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;identity;membership</PackageTags>
   </PropertyGroup>

+ 1 - 1
src/Identity/Extensions.Core/src/Microsoft.Extensions.Identity.Core.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core Identity is the membership system for building ASP.NET Core web applications, including membership, login, and user data. ASP.NET Core Identity allows you to add login features to your application and makes it easy to customize data about the logged in user.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;identity;membership</PackageTags>
   </PropertyGroup>
@@ -11,7 +12,6 @@
     <Reference Include="Microsoft.AspNetCore.Cryptography.KeyDerivation" />
     <Reference Include="Microsoft.Extensions.Logging" />
     <Reference Include="Microsoft.Extensions.Options" />
-    <Reference Include="System.ComponentModel.Annotations" />
   </ItemGroup>
 
 </Project>

+ 1 - 1
src/Identity/Extensions.Stores/src/Microsoft.Extensions.Identity.Stores.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core Identity is the membership system for building ASP.NET Core web applications, including membership, login, and user data. ASP.NET Core Identity allows you to add login features to your application and makes it easy to customize data about the logged in user.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;identity;membership</PackageTags>
   </PropertyGroup>
@@ -10,7 +11,6 @@
   <ItemGroup>
     <Reference Include="Microsoft.Extensions.Logging" />
     <Reference Include="Microsoft.Extensions.Identity.Core" />
-    <Reference Include="System.ComponentModel.Annotations" />
   </ItemGroup>
 
 </Project>

+ 1 - 0
src/Middleware/CORS/src/Microsoft.AspNetCore.Cors.csproj

@@ -6,6 +6,7 @@ Commonly used types:
 Microsoft.AspNetCore.Cors.DisableCorsAttribute
 Microsoft.AspNetCore.Cors.EnableCorsAttribute</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;cors</PackageTags>

+ 1 - 0
src/Middleware/Diagnostics.Abstractions/src/Microsoft.AspNetCore.Diagnostics.Abstractions.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core diagnostics middleware abstractions and feature interface definitions.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;diagnostics</PackageTags>

+ 2 - 3
src/Middleware/Diagnostics/src/Microsoft.AspNetCore.Diagnostics.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core middleware for exception handling, exception display pages, and diagnostics information. Includes developer exception page middleware, exception handler middleware, runtime info middleware, status code page middleware, and welcome page middleware</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;diagnostics</PackageTags>
@@ -23,9 +24,7 @@
     <Reference Include="Microsoft.Extensions.FileProviders.Physical" />
     <Reference Include="Microsoft.Extensions.Logging.Abstractions" />
     <Reference Include="Microsoft.Extensions.Options" />
-    <Reference Include="Microsoft.Extensions.TypeNameHelper.Sources" PrivateAssets="All" />
-    <Reference Include="System.Diagnostics.DiagnosticSource" />
-    <Reference Include="System.Reflection.Metadata" />
+    <Reference Include="Microsoft.Extensions.TypeNameHelper.Sources" SharedSources="true" />
   </ItemGroup>
 
 </Project>

+ 2 - 1
src/Middleware/HealthChecks/src/Microsoft.AspNetCore.Diagnostics.HealthChecks.csproj

@@ -3,11 +3,12 @@
   <PropertyGroup>
     <Description>ASP.NET Core middleware for returning the results of Health Checks in the application</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>diagnostics;healthchecks</PackageTags>
     <Description>ASP.NET Core middleware for returning the results of Health Checks in the application
-      
+
     </Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
     <NoWarn>$(NoWarn);CS1591</NoWarn>

+ 2 - 1
src/Middleware/HostFiltering/src/Microsoft.AspNetCore.HostFiltering.csproj

@@ -5,6 +5,7 @@
       ASP.NET Core middleware for filtering out requests with unknown HTTP host headers.
     </Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore</PackageTags>
   </PropertyGroup>
@@ -13,6 +14,6 @@
     <Reference Include="Microsoft.AspNetCore.Http" />
     <Reference Include="Microsoft.AspNetCore.Http.Extensions" />
     <Reference Include="Microsoft.Extensions.Options" />
-    <Reference Include="Microsoft.AspNetCore.Hosting.Abstractions" /> 
+    <Reference Include="Microsoft.AspNetCore.Hosting.Abstractions" />
   </ItemGroup>
 </Project>

+ 1 - 0
src/Middleware/HttpOverrides/src/Microsoft.AspNetCore.HttpOverrides.csproj

@@ -5,6 +5,7 @@
 * X-Forwarded-* headers to forward headers from a proxy.
 * HTTP method override header.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;proxy;headers;xforwarded</PackageTags>

+ 2 - 1
src/Middleware/HttpsPolicy/src/Microsoft.AspNetCore.HttpsPolicy.csproj

@@ -5,6 +5,7 @@
       ASP.NET Core basic middleware for supporting HTTPS Redirection and HTTP Strict-Transport-Security.
     </Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;https;hsts</PackageTags>
@@ -15,6 +16,6 @@
     <Reference Include="Microsoft.AspNetCore.Http.Extensions" />
     <Reference Include="Microsoft.Extensions.Configuration.Binder" />
     <Reference Include="Microsoft.Extensions.Options" />
-    <Reference Include="Microsoft.AspNetCore.Hosting.Abstractions" /> 
+    <Reference Include="Microsoft.AspNetCore.Hosting.Abstractions" />
   </ItemGroup>
 </Project>

+ 1 - 0
src/Middleware/Localization.Routing/src/Microsoft.AspNetCore.Localization.Routing.csproj

@@ -4,6 +4,7 @@
     <Product>Microsoft ASP.NET Core</Product>
     <Description>Provides a request culture provider which gets culture and ui-culture from request's route data.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;localization</PackageTags>

+ 1 - 0
src/Middleware/Localization/src/Microsoft.AspNetCore.Localization.csproj

@@ -4,6 +4,7 @@
     <Product>Microsoft ASP.NET Core</Product>
     <Description>ASP.NET Core middleware for automatically applying culture information to HTTP requests. Culture information can be specified in the HTTP header, query string, cookie, or custom source.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;localization</PackageTags>

+ 0 - 1
src/Middleware/MiddlewareAnalysis/src/Microsoft.AspNetCore.MiddlewareAnalysis.csproj

@@ -12,7 +12,6 @@
   <ItemGroup>
     <Reference Include="Microsoft.AspNetCore.Hosting.Abstractions" />
     <Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
-    <Reference Include="System.Diagnostics.DiagnosticSource" />
   </ItemGroup>
 
 </Project>

+ 1 - 0
src/Middleware/ResponseCaching.Abstractions/src/Microsoft.AspNetCore.ResponseCaching.Abstractions.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core response caching middleware abstractions and feature interface definitions.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;cache;caching</PackageTags>
   </PropertyGroup>

+ 1 - 0
src/Middleware/ResponseCaching/src/Microsoft.AspNetCore.ResponseCaching.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core middleware for caching HTTP responses on the server.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>

+ 1 - 0
src/Middleware/ResponseCompression/src/Microsoft.AspNetCore.ResponseCompression.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core middleware for HTTP Response compression.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore</PackageTags>
   </PropertyGroup>

+ 1 - 0
src/Middleware/Rewrite/src/Microsoft.AspNetCore.Rewrite.csproj

@@ -6,6 +6,7 @@
 * Support for running IIS URL Rewrite module rules
 * Support for running Apache mod_rewrite rules.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;urlrewrite;mod_rewrite</PackageTags>

+ 1 - 0
src/Middleware/Session/src/Microsoft.AspNetCore.Session.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core session state middleware.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>

+ 1 - 0
src/Middleware/StaticFiles/src/Microsoft.AspNetCore.StaticFiles.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core static files middleware. Includes middleware for serving static files, directory browsing, and default files.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;staticfiles</PackageTags>

+ 1 - 0
src/Middleware/WebSockets/src/Microsoft.AspNetCore.WebSockets.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core web socket middleware for use on top of opaque servers.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>

+ 2 - 1
src/Mvc/src/Microsoft.AspNetCore.Mvc.Abstractions/Microsoft.AspNetCore.Mvc.Abstractions.csproj

@@ -5,6 +5,7 @@
 Commonly used types:
 Microsoft.AspNetCore.Mvc.IActionResult</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;aspnetcoremvc</PackageTags>
@@ -20,7 +21,7 @@ Microsoft.AspNetCore.Mvc.IActionResult</Description>
   </ItemGroup>
 
   <ItemGroup Label="Sources packages">
-    <Reference Include="Microsoft.Extensions.HashCodeCombiner.Sources" PrivateAssets="All" />
+    <Reference Include="Microsoft.Extensions.HashCodeCombiner.Sources" SharedSources="true" />
   </ItemGroup>
 
 </Project>

+ 1 - 0
src/Mvc/src/Microsoft.AspNetCore.Mvc.ApiExplorer/Microsoft.AspNetCore.Mvc.ApiExplorer.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core MVC API explorer functionality for discovering metadata such as the list of controllers and actions, and their URLs and allowed HTTP methods.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;aspnetcoremvc</PackageTags>

+ 4 - 5
src/Mvc/src/Microsoft.AspNetCore.Mvc.Core/Microsoft.AspNetCore.Mvc.Core.csproj

@@ -11,6 +11,7 @@ Microsoft.AspNetCore.Mvc.FromFormAttribute
 Microsoft.AspNetCore.Mvc.RequireHttpsAttribute
 Microsoft.AspNetCore.Mvc.RouteAttribute</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;aspnetcoremvc</PackageTags>
@@ -40,14 +41,12 @@ Microsoft.AspNetCore.Mvc.RouteAttribute</Description>
     <Reference Include="Microsoft.Extensions.DependencyModel" />
     <Reference Include="Microsoft.Extensions.FileProviders.Abstractions" />
     <Reference Include="Microsoft.Extensions.Logging.Abstractions" />
-    <Reference Include="System.Diagnostics.DiagnosticSource" />
-    <Reference Include="System.Threading.Tasks.Extensions" />
   </ItemGroup>
 
   <ItemGroup Label="Sources packages">
-    <Reference Include="Microsoft.Extensions.ParameterDefaultValue.Sources" PrivateAssets="All" />
-    <Reference Include="Microsoft.Extensions.TypeNameHelper.Sources" PrivateAssets="All" />
-    <Reference Include="Microsoft.Extensions.ValueStopwatch.Sources" PrivateAssets="All" />
+    <Reference Include="Microsoft.Extensions.ParameterDefaultValue.Sources" SharedSources="true" />
+    <Reference Include="Microsoft.Extensions.TypeNameHelper.Sources" SharedSources="true" />
+    <Reference Include="Microsoft.Extensions.ValueStopwatch.Sources" SharedSources="true" />
   </ItemGroup>
 
 </Project>

+ 1 - 0
src/Mvc/src/Microsoft.AspNetCore.Mvc.Cors/Microsoft.AspNetCore.Mvc.Cors.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core MVC cross-origin resource sharing (CORS) features.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;aspnetcoremvc;cors</PackageTags>

+ 1 - 2
src/Mvc/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Microsoft.AspNetCore.Mvc.DataAnnotations.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core MVC metadata and validation system using System.ComponentModel.DataAnnotations.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;aspnetcoremvc</PackageTags>
@@ -10,8 +11,6 @@
 
   <ItemGroup>
     <Reference Include="Microsoft.AspNetCore.Mvc.Core" />
-
     <Reference Include="Microsoft.Extensions.Localization" />
-    <Reference Include="System.ComponentModel.Annotations" />
   </ItemGroup>
 </Project>

+ 1 - 0
src/Mvc/src/Microsoft.AspNetCore.Mvc.Formatters.Json/Microsoft.AspNetCore.Mvc.Formatters.Json.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core MVC formatters for JSON input and output.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;aspnetcoremvc;json</PackageTags>
   </PropertyGroup>

+ 1 - 0
src/Mvc/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/Microsoft.AspNetCore.Mvc.Formatters.Xml.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core MVC formatters for XML input and output using DataContractSerializer and XmlSerializer.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;aspnetcoremvc;xml</PackageTags>

+ 1 - 0
src/Mvc/src/Microsoft.AspNetCore.Mvc.Localization/Microsoft.AspNetCore.Mvc.Localization.csproj

@@ -6,6 +6,7 @@ Commonly used types:
 Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer&lt;TResource&gt;
 Microsoft.AspNetCore.Mvc.Localization.IViewLocalizer</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;aspnetcoremvc;localization</PackageTags>

+ 1 - 0
src/Mvc/src/Microsoft.AspNetCore.Mvc.Razor/Microsoft.AspNetCore.Mvc.Razor.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core MVC Razor view engine for CSHTML files.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;aspnetcoremvc;cshtml;razor</PackageTags>

+ 1 - 0
src/Mvc/src/Microsoft.AspNetCore.Mvc.RazorPages/Microsoft.AspNetCore.Mvc.RazorPages.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core MVC Razor Pages.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;aspnetcoremvc;cshtml;razor</PackageTags>

+ 1 - 0
src/Mvc/src/Microsoft.AspNetCore.Mvc.TagHelpers/Microsoft.AspNetCore.Mvc.TagHelpers.csproj

@@ -6,6 +6,7 @@
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;aspnetcoremvc;taghelper;taghelpers</PackageTags>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
   </PropertyGroup>
 
   <ItemGroup>

+ 1 - 0
src/Mvc/src/Microsoft.AspNetCore.Mvc.ViewFeatures/Microsoft.AspNetCore.Mvc.ViewFeatures.csproj

@@ -11,6 +11,7 @@ Microsoft.AspNetCore.Mvc.ViewComponent</Description>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;aspnetcoremvc</PackageTags>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
   </PropertyGroup>
 
   <ItemGroup>

+ 1 - 0
src/Mvc/src/Microsoft.AspNetCore.Mvc/Microsoft.AspNetCore.Mvc.csproj

@@ -6,6 +6,7 @@
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;aspnetcoremvc</PackageTags>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
   </PropertyGroup>
 
   <ItemGroup>

+ 1 - 0
src/Razor/Razor.Runtime/src/Microsoft.AspNetCore.Razor.Runtime.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>Runtime infrastructure for rendering Razor pages and tag helpers.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>$(PackageTags);taghelper;taghelpers</PackageTags>
   </PropertyGroup>

+ 2 - 1
src/Razor/Razor/src/Microsoft.AspNetCore.Razor.csproj

@@ -9,6 +9,7 @@ Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeNameAttribute
 Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElementAttribute
 Microsoft.AspNetCore.Razor.TagHelpers.ITagHelper</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>$(PackageTags);taghelper;taghelpers</PackageTags>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
@@ -19,7 +20,7 @@ Microsoft.AspNetCore.Razor.TagHelpers.ITagHelper</Description>
 
   <ItemGroup>
     <Reference Include="Microsoft.AspNetCore.Html.Abstractions" />
-    <Reference Include="Microsoft.Extensions.HashCodeCombiner.Sources" PrivateAssets="All" />
+    <Reference Include="Microsoft.Extensions.HashCodeCombiner.Sources" SharedSources="true" />
   </ItemGroup>
 
 </Project>

+ 1 - 0
src/Security/Authentication/Cookies/src/Microsoft.AspNetCore.Authentication.Cookies.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core middleware that enables an application to use cookie based authentication.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <DefineConstants>$(DefineConstants);SECURITY</DefineConstants>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>

+ 1 - 0
src/Security/Authentication/Core/src/Microsoft.AspNetCore.Authentication.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core common types used by the various authentication middleware components.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;authentication;security</PackageTags>

+ 1 - 0
src/Security/Authentication/OAuth/src/Microsoft.AspNetCore.Authentication.OAuth.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core middleware that enables an application to support any standard OAuth 2.0 authentication workflow.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;authentication;security</PackageTags>

+ 1 - 0
src/Security/Authorization/Core/src/Microsoft.AspNetCore.Authorization.csproj

@@ -6,6 +6,7 @@ Commonly used types:
 Microsoft.AspNetCore.Authorization.AllowAnonymousAttribute
 Microsoft.AspNetCore.Authorization.AuthorizeAttribute</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;authorization</PackageTags>

+ 1 - 0
src/Security/Authorization/Policy/src/Microsoft.AspNetCore.Authorization.Policy.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core authorization policy helper classes.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591;NU1605</NoWarn>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;authorization</PackageTags>

+ 1 - 0
src/Security/CookiePolicy/src/Microsoft.AspNetCore.CookiePolicy.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core cookie policy classes to control the behavior of cookies.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore</PackageTags>

+ 2 - 1
src/Servers/Connections.Abstractions/src/Microsoft.AspNetCore.Connections.Abstractions.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>Core components of ASP.NET Core networking protocol stack.</Description>
     <TargetFramework>netstandard2.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore</PackageTags>
     <NoWarn>CS1591;$(NoWarn)</NoWarn>
@@ -11,7 +12,7 @@
 
   <ItemGroup>
     <Reference Include="Microsoft.AspNetCore.Http.Features" />
-    <Reference Include="Microsoft.Extensions.ActivatorUtilities.Sources" PrivateAssets="All" />
+    <Reference Include="Microsoft.Extensions.ActivatorUtilities.Sources" SharedSources="true" />
     <Reference Include="System.IO.Pipelines" />
   </ItemGroup>
 

+ 1 - 0
src/Servers/HttpSys/src/Microsoft.AspNetCore.Server.HttpSys.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core HTTP server that uses the Windows HTTP Server API.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>

+ 1 - 0
src/Servers/IIS/IIS/src/Microsoft.AspNetCore.Server.IIS.csproj

@@ -2,6 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <PackageId>Microsoft.AspNetCore.Server.IIS</PackageId>
     <Description>Provides support for hosting ASP.NET Core in IIS using the AspNetCoreModule.</Description>
     <NoWarn>$(NoWarn);CS1591</NoWarn>

+ 1 - 3
src/Servers/IIS/IISIntegration/src/Microsoft.AspNetCore.Server.IISIntegration.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core components for working with the IIS AspNetCoreModule.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <NoWarn>$(NoWarn);CS1591</NoWarn>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;iis</PackageTags>
@@ -17,10 +18,7 @@
     <Reference Include="Microsoft.AspNetCore.HttpOverrides" />
     <Reference Include="Microsoft.Extensions.Logging.Abstractions" />
     <Reference Include="Microsoft.Extensions.Options" />
-    <Reference Include="System.Buffers" />
     <Reference Include="System.IO.Pipelines" />
-    <Reference Include="System.Memory" />
-    <Reference Include="System.Numerics.Vectors" />
     <Reference Include="System.Runtime.CompilerServices.Unsafe" />
     <Reference Include="System.Security.Principal.Windows" />
   </ItemGroup>

+ 1 - 3
src/Servers/Kestrel/Core/src/Microsoft.AspNetCore.Server.Kestrel.Core.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>Core components of ASP.NET Core Kestrel cross-platform web server.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;kestrel</PackageTags>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
@@ -22,11 +23,8 @@
     <Reference Include="Microsoft.Extensions.Logging.Abstractions" />
     <Reference Include="Microsoft.Extensions.Options" />
     <Reference Include="Microsoft.Net.Http.Headers" />
-    <Reference Include="System.Memory" />
-    <Reference Include="System.Numerics.Vectors" />
     <Reference Include="System.Runtime.CompilerServices.Unsafe" />
     <Reference Include="System.Security.Cryptography.Cng" />
-    <Reference Include="System.Threading.Tasks.Extensions" />
   </ItemGroup>
 
   <ItemGroup>

+ 0 - 1
src/Servers/Kestrel/Core/test/Microsoft.AspNetCore.Server.Kestrel.Core.Tests.csproj

@@ -19,7 +19,6 @@
     <Reference Include="Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions" />
     <Reference Include="Microsoft.Extensions.DependencyInjection" />
     <Reference Include="Microsoft.Extensions.Logging" />
-    <Reference Include="System.Memory" />
     <Reference Include="System.Runtime.CompilerServices.Unsafe" />
   </ItemGroup>
 

+ 1 - 0
src/Servers/Kestrel/Kestrel/src/Microsoft.AspNetCore.Server.Kestrel.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>ASP.NET Core Kestrel cross-platform web server.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;kestrel</PackageTags>
     <NoWarn>CS1591;$(NoWarn)</NoWarn>

+ 1 - 0
src/Servers/Kestrel/Transport.Abstractions/src/Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>Transport abstractions for the ASP.NET Core Kestrel cross-platform web server.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;kestrel</PackageTags>
     <NoWarn>CS1570;CS1571;CS1572;CS1573;CS1574;CS1591;$(NoWarn)</NoWarn>

+ 1 - 0
src/Servers/Kestrel/Transport.Sockets/src/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>Managed socket transport for the ASP.NET Core Kestrel cross-platform web server.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;kestrel</PackageTags>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>

+ 7 - 4
src/SignalR/common/Http.Connections.Common/src/Microsoft.AspNetCore.Http.Connections.Common.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>Common primitives for ASP.NET Connection Handlers and clients</Description>
     <TargetFrameworks>netstandard2.0;netcoreapp3.0</TargetFrameworks>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <RootNamespace>Microsoft.AspNetCore.Http.Connections</RootNamespace>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <IsShippingPackage>true</IsShippingPackage>
@@ -16,10 +17,12 @@
 
   <ItemGroup>
     <Reference Include="Microsoft.AspNetCore.Connections.Abstractions" />
+    <Reference Include="System.Runtime.CompilerServices.Unsafe" />
+  </ItemGroup>
+
+  <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'" >
+    <Reference Include="Microsoft.Bcl.Json.Sources" SharedSources="true" />
     <Reference Include="System.Buffers" />
-    <Reference Include="Microsoft.Bcl.Json.Sources" Condition="'$(TargetFramework)' == 'netstandard2.0'">
-      <PrivateAssets>All</PrivateAssets>
-    </Reference>
-    <Reference Include="System.Runtime.CompilerServices.Unsafe" Condition="'$(TargetFramework)' == 'netstandard2.0'" />
   </ItemGroup>
+
 </Project>

+ 2 - 2
src/SignalR/common/Http.Connections/src/Microsoft.AspNetCore.Http.Connections.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>Components for providing real-time bi-directional communication across the Web.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
   </PropertyGroup>
 
   <ItemGroup>
@@ -27,10 +28,9 @@
     <Reference Include="Microsoft.AspNetCore.Http" />
     <Reference Include="Microsoft.AspNetCore.Routing" />
     <Reference Include="Microsoft.AspNetCore.WebSockets" />
-    <Reference Include="Microsoft.Extensions.ValueStopwatch.Sources" PrivateAssets="All" />
+    <Reference Include="Microsoft.Extensions.ValueStopwatch.Sources" SharedSources="true" />
     <Reference Include="Newtonsoft.Json" />
     <Reference Include="System.Security.Principal.Windows" />
-
   </ItemGroup>
 
 </Project>

+ 2 - 0
src/SignalR/common/Protocols.NewtonsoftJson/src/Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson.csproj

@@ -3,6 +3,8 @@
   <PropertyGroup>
     <Description>Implements the SignalR Hub Protocol using Newtonsoft.Json.</Description>
     <TargetFramework>netstandard2.0</TargetFramework>
+    <!-- TODO: remove this from the shared framework once we have a JSON protocol implementation which doesn't use Newtonsoft.Json. -->
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <RootNamespace>Microsoft.AspNetCore.SignalR</RootNamespace>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <IsShippingPackage>true</IsShippingPackage>

+ 6 - 4
src/SignalR/common/SignalR.Common/src/Microsoft.AspNetCore.SignalR.Common.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>Common serialiation primitives for SignalR Clients Servers</Description>
     <TargetFrameworks>netstandard2.0;netcoreapp3.0</TargetFrameworks>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <RootNamespace>Microsoft.AspNetCore.SignalR</RootNamespace>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <IsShippingPackage>true</IsShippingPackage>
@@ -21,11 +22,12 @@
   <ItemGroup>
     <Reference Include="Microsoft.AspNetCore.Connections.Abstractions" />
     <Reference Include="Microsoft.Extensions.Options" />
+    <Reference Include="System.Runtime.CompilerServices.Unsafe" />
+  </ItemGroup>
+
+  <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
+    <Reference Include="Microsoft.Bcl.Json.Sources" SharedSources="true" />
     <Reference Include="System.Buffers" />
-    <Reference Include="Microsoft.Bcl.Json.Sources" Condition="'$(TargetFramework)' == 'netstandard2.0'">
-      <PrivateAssets>All</PrivateAssets>
-    </Reference>
-    <Reference Include="System.Runtime.CompilerServices.Unsafe" Condition="'$(TargetFramework)' == 'netstandard2.0'" />
   </ItemGroup>
 
 </Project>

+ 1 - 0
src/SignalR/server/Core/src/Microsoft.AspNetCore.SignalR.Core.csproj

@@ -3,6 +3,7 @@
   <PropertyGroup>
     <Description>Real-time communication framework for ASP.NET Core.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
     <RootNamespace>Microsoft.AspNetCore.SignalR</RootNamespace>
   </PropertyGroup>
 

+ 1 - 0
src/SignalR/server/SignalR/src/Microsoft.AspNetCore.SignalR.csproj

@@ -2,6 +2,7 @@
   <PropertyGroup>
     <Description>Components for providing real-time bi-directional communication across the Web.</Description>
     <TargetFramework>netcoreapp3.0</TargetFramework>
+    <IsAspNetCoreApp>true</IsAspNetCoreApp>
   </PropertyGroup>
 
   <ItemGroup>