Remove Microsoft.AspNetCore.All (#3761)

This shared framework and metapackage are obsolete. The recommended replacement is Microsoft.AspNetCore.App.
This commit is contained in:
Nate McMaster 2018-10-31 12:13:05 -07:00 committed by GitHub
parent 4a5d7cf930
commit ba87c3fbd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 19 additions and 160 deletions

View File

@ -26,7 +26,7 @@
<!-- installers -->
<SharedFxInstallerName>aspnetcore-runtime</SharedFxInstallerName>
<!--
This is named aspnetcore-runtime-internal because it only includes Microsoft.AspNetCore.All and is an intermediate file passed off to signing, installer generation, etc.
This is named aspnetcore-runtime-internal because it only includes Microsoft.AspNetCore.App and is an intermediate file passed off to signing, installer generation, etc.
Subsequent build steps will combine this with Microsoft.NETCore.App and produce final tarballs/zips.
-->
<SharedFxIntermediateArchiveBaseName>$(SharedFxInstallerName)-internal</SharedFxIntermediateArchiveBaseName>

View File

@ -21,9 +21,7 @@
<PackageArtifact Include="Internal.AspNetCore.Universe.Lineup" Category="noship" />
<PackageArtifact Include="Internal.WebHostBuilderFactory.Sources" Category="noship" />
<PackageArtifact Include="Microsoft.AspNet.Identity.AspNetCoreCompat" Category="noship" />
<PackageArtifact Include="Microsoft.AspNetCore.All" Category="ship" />
<PackageArtifact Include="Microsoft.AspNetCore.App" Category="ship" />
<PackageArtifact Include="runtime.$(SharedFxRid).Microsoft.AspNetCore.All" Category="noship" />
<PackageArtifact Include="runtime.$(SharedFxRid).Microsoft.AspNetCore.App" Category="noship" />
<PackageArtifact Include="Microsoft.AspNetCore.Antiforgery" Category="ship" />
<PackageArtifact Include="Microsoft.AspNetCore.ApplicationInsights.HostingStartup" Category="ship" />

View File

@ -39,7 +39,6 @@
<NativeInstaller Include="x64" FileExt=".rpm" />
<NativeInstaller Include="rh.rhel.7-x64" FileExt=".rpm" />
<SharedFrameworkName Include="Microsoft.AspNetCore.All" />
<SharedFrameworkName Include="Microsoft.AspNetCore.App" />
</ItemGroup>

View File

@ -42,7 +42,6 @@ The result of this typically means including the transitive graph of the followi
- Packages that match bundled runtimes
- Microsoft.NETCore.App
- Microsoft.AspNetCore.App
- Microsoft.AspNetCore.All
- Packages that Microsoft.NET.Sdk adds implicitly
- Microsoft.NETCore.App
- NETStandard.Library
@ -60,5 +59,4 @@ Given the following parameters:
The LZMA should contain
- Microsoft.NETCore.App/2.1.0 + netcoreapp2.1 dependencies (Microsoft.NET.Sdk will implicitly reference "2.1", which NuGet to 2.1.0)
- Microsoft.NETCore.App/2.1.8 + netcoreapp2.1 dependencies (Matches the runtime in shared/Microsoft.NETCore.App/2.1.8/)
- Microsoft.AspNetCore.All/2.1.7 + netcoreapp2.1 dependencies (Matches the runtime in shared/Microsoft.AspNetCore.All/2.1.7/)
- NETStandard.Library/2.0.1 + netstandard2.0 dependencies (Microsoft.NET.Sdk will implicitly reference "2.0.1")

View File

@ -9,30 +9,29 @@ namespace Microsoft.AspNetCore
{
public class SharedFxTests
{
[Theory]
[MemberData(nameof(GetSharedFxConfig))]
public void ItContainsValidRuntimeConfigFile(SharedFxConfig config)
[Fact]
public void ItContainsValidRuntimeConfigFile()
{
var runtimeConfigFilePath = Path.Combine(config.MetadataOutput, config.Name + ".runtimeconfig.json");
var runtimeConfigFilePath = Path.Combine(GetMetadataOutput(), "Microsoft.AspNetCore.App.runtimeconfig.json");
AssertEx.FileExists(runtimeConfigFilePath);
AssertEx.FileDoesNotExists(Path.Combine(config.MetadataOutput, config.Name + ".runtimeconfig.dev.json"));
AssertEx.FileDoesNotExists(Path.Combine(GetMetadataOutput(), "Microsoft.AspNetCore.App.runtimeconfig.dev.json"));
var runtimeConfig = JObject.Parse(File.ReadAllText(runtimeConfigFilePath));
Assert.Equal(config.BaseSharedFxName, (string)runtimeConfig["runtimeOptions"]["framework"]["name"]);
Assert.Equal("netcoreapp" + config.Version.Substring(0, 3), (string)runtimeConfig["runtimeOptions"]["tfm"]);
Assert.Equal("Microsoft.NETCore.App", (string)runtimeConfig["runtimeOptions"]["framework"]["name"]);
Assert.Equal("netcoreapp" + TestData.GetPackageVersion().Substring(0, 3), (string)runtimeConfig["runtimeOptions"]["tfm"]);
Assert.Equal(config.BaseSharedFxVersion, (string)runtimeConfig["runtimeOptions"]["framework"]["version"]);
Assert.Equal(TestData.GetMicrosoftNETCoreAppPackageVersion(), (string)runtimeConfig["runtimeOptions"]["framework"]["version"]);
}
[Theory]
[MemberData(nameof(GetSharedFxConfig))]
public void ItContainsValidDepsJson(SharedFxConfig config)
[Fact]
public void ItContainsValidDepsJson()
{
var depsFilePath = Path.Combine(config.MetadataOutput, config.Name + ".deps.json");
var depsFilePath = Path.Combine(GetMetadataOutput(), "Microsoft.AspNetCore.App.deps.json");
var rid = TestData.GetSharedFxRuntimeIdentifier();
var target = $".NETCoreApp,Version=v{config.Version.Substring(0, 3)}/{config.RuntimeIdentifier}";
var target = $".NETCoreApp,Version=v{TestData.GetPackageVersion().Substring(0, 3)}/{rid}";
AssertEx.FileExists(depsFilePath);
@ -42,7 +41,7 @@ namespace Microsoft.AspNetCore
Assert.NotNull(depsFile["targets"][target]);
Assert.NotNull(depsFile["compilationOptions"]);
Assert.Empty(depsFile["compilationOptions"]);
Assert.NotEmpty(depsFile["runtimes"][config.RuntimeIdentifier]);
Assert.NotEmpty(depsFile["runtimes"][rid]);
Assert.All(depsFile["libraries"], item =>
{
var prop = Assert.IsType<JProperty>(item);
@ -52,50 +51,17 @@ namespace Microsoft.AspNetCore
});
}
[Theory]
[MemberData(nameof(GetSharedFxConfig))]
public void ItContainsVersionFile(SharedFxConfig config)
[Fact]
public void ItContainsVersionFile()
{
var versionFile = Path.Combine(config.MetadataOutput, ".version");
var versionFile = Path.Combine(GetMetadataOutput(), ".version");
AssertEx.FileExists(versionFile);
var lines = File.ReadAllLines(versionFile);
Assert.Equal(2, lines.Length);
Assert.Equal(TestData.GetRepositoryCommit(), lines[0]);
Assert.Equal(config.Version, lines[1]);
Assert.Equal(TestData.GetPackageVersion(), lines[1]);
}
public static TheoryData<SharedFxConfig> GetSharedFxConfig()
=> new TheoryData<SharedFxConfig>
{
new SharedFxConfig
{
Name = "Microsoft.AspNetCore.All",
Version = TestData.GetPackageVersion(),
// Intentionally assert aspnetcore frameworks align versions with each other and netcore
BaseSharedFxVersion = TestData.GetPackageVersion(),
BaseSharedFxName = "Microsoft.AspNetCore.App",
RuntimeIdentifier = TestData.GetSharedFxRuntimeIdentifier(),
MetadataOutput = TestData.GetTestDataValue("SharedFxMetadataOutput:Microsoft.AspNetCore.All")
},
new SharedFxConfig
{
Name = "Microsoft.AspNetCore.App",
Version = TestData.GetPackageVersion(),
BaseSharedFxName = "Microsoft.NETCore.App",
BaseSharedFxVersion = TestData.GetMicrosoftNETCoreAppPackageVersion(),
RuntimeIdentifier = TestData.GetSharedFxRuntimeIdentifier(),
MetadataOutput = TestData.GetTestDataValue("SharedFxMetadataOutput:Microsoft.AspNetCore.App")
},
};
public class SharedFxConfig
{
public string Name { get; set; }
public string Version { get; set; }
public string BaseSharedFxName { get; set; }
public string BaseSharedFxVersion { get; set; }
public string RuntimeIdentifier { get; set; }
public string MetadataOutput { get; set; }
}
private string GetMetadataOutput() => TestData.GetTestDataValue("SharedFxMetadataOutput:Microsoft.AspNetCore.App");
}
}

View File

@ -1,43 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<PackageTags>aspnetcore</PackageTags>
<PackageDescription>Provides a default set of APIs for building an ASP.NET Core application, and also includes API for third-party integrations with ASP.NET Core.
This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.
</PackageDescription>
</PropertyGroup>
<ItemGroup>
<Content Include="build\$(TargetFramework)\*.props" PackagePath="%(Identity)" />
<Content Include="build\$(TargetFramework)\*.targets" PackagePath="%(Identity)" />
<Content Include="lib\$(TargetFramework)\_._" PackagePath="%(Identity)" />
</ItemGroup>
<ItemDefinitionGroup>
<Dependency>
<VersionRangeType>Minimum</VersionRangeType>
</Dependency>
</ItemDefinitionGroup>
<Import Project="..\..\Microsoft.AspNetCore.App\Microsoft.AspNetCore.App.props" />
<ItemGroup>
<Dependency Include="Microsoft.AspNetCore.ApplicationInsights.HostingStartup" Version="$(MicrosoftAspNetCoreApplicationInsightsHostingStartupPackageVersion)" />
<Dependency Include="Microsoft.AspNetCore.AzureAppServices.HostingStartup" Version="$(MicrosoftAspNetCoreAzureAppServicesHostingStartupPackageVersion)" />
<Dependency Include="Microsoft.AspNetCore.AzureAppServicesIntegration" Version="$(MicrosoftAspNetCoreAzureAppServicesIntegrationPackageVersion)" />
<Dependency Include="Microsoft.AspNetCore.DataProtection.AzureKeyVault" Version="$(MicrosoftAspNetCoreDataProtectionAzureKeyVaultPackageVersion)" />
<Dependency Include="Microsoft.AspNetCore.DataProtection.AzureStorage" Version="$(MicrosoftAspNetCoreDataProtectionAzureStoragePackageVersion)" />
<Dependency Include="Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv" Version="$(MicrosoftAspNetCoreServerKestrelTransportLibuvPackageVersion)" />
<Dependency Include="Microsoft.AspNetCore.SignalR.Redis" Version="$(MicrosoftAspNetCoreSignalRRedisPackageVersion)" />
<Dependency Include="Microsoft.Data.Sqlite.Core" Version="$(MicrosoftDataSqliteCorePackageVersion)" />
<Dependency Include="Microsoft.Data.Sqlite" Version="$(MicrosoftDataSqlitePackageVersion)" />
<Dependency Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="$(MicrosoftEntityFrameworkCoreSqliteCorePackageVersion)" />
<Dependency Include="Microsoft.EntityFrameworkCore.Sqlite" Version="$(MicrosoftEntityFrameworkCoreSqlitePackageVersion)" />
<Dependency Include="Microsoft.Extensions.Caching.Redis" Version="$(MicrosoftExtensionsCachingRedisPackageVersion)" />
<Dependency Include="Microsoft.Extensions.Configuration.AzureKeyVault" Version="$(MicrosoftExtensionsConfigurationAzureKeyVaultPackageVersion)" />
<Dependency Include="Microsoft.Extensions.Logging.AzureAppServices" Version="$(MicrosoftExtensionsLoggingAzureAppServicesPackageVersion)" />
</ItemGroup>
</Project>

View File

@ -1,19 +0,0 @@
<Project>
<!--
The _AspNetCoreAllSharedFxIsEnabled property is meant for internal use only. When set to 'false',
the default value of MicrosoftNETPlatformLibrary will be Microsoft.NETCore.App. It was added to support
a better SDK exprience on platforms where the ASP.NET Core shared framework is not avaiable.
In these cases, ASP.NET Core can still be as if it were just a set of NuGet packages.
-->
<PropertyGroup Condition=" '$(_AspNetCoreAllSharedFxIsEnabled)' == '' ">
<!--
Disable the base runtime, Microsoft.AspNetCore.App, when this package is imported
-->
<_AspNetCoreAppSharedFxIsEnabled>false</_AspNetCoreAppSharedFxIsEnabled>
<!--
NB: this is _AspNetCore*All*SharedFxIsEnabled, not _AspNetCore*App*SharedFxIsEnabled
-->
<_AspNetCoreAllSharedFxIsEnabled>true</_AspNetCoreAllSharedFxIsEnabled>
</PropertyGroup>
</Project>

View File

@ -1,18 +0,0 @@
<Project>
<!--
This property instructs the .NET Core SDK to treat this package as the shared framework platform.
This affects how the SDK will trim references and publish output, determines how the runtimeconfig
files are generated, and may affect how optimizations are preformed by other tools.
NB: this is _AspNetCore*All*SharedFxIsEnabled, not _AspNetCore*App*SharedFxIsEnabled
-->
<PropertyGroup Condition=" '$(_AspNetCoreAllSharedFxIsEnabled)' == 'true' ">
<MicrosoftNETPlatformLibrary>Microsoft.AspNetCore.All</MicrosoftNETPlatformLibrary>
</PropertyGroup>
<Target Name="EnsureTFMCompatibility" BeforeTargets="_CheckForInvalidConfigurationAndPlatform">
<Error
Text="This version of Microsoft.AspNetCore.All is only compatible with the netcoreapp3.0 target framework. Please target netcoreapp3.0 or choose a version of Microsoft.AspNetCore.All compatible with $(TargetFramework)."
Condition="'$(TargetFramework)' != 'netcoreapp3.0'"/>
</Target>
</Project>

View File

@ -1,21 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<BaseSharedFrameworkName>Microsoft.AspNetCore.App</BaseSharedFrameworkName>
<RuntimeFrameworkVersion>$(MicrosoftNETCoreAppPackageVersion)</RuntimeFrameworkVersion>
<!-- The runtime Package ID is for self-contained assets. -->
<PackageId>runtime.$(SharedFxRid).$(MSBuildProjectName)</PackageId>
<PackageDescription>This package provides assets used for self-contained deployments of an ASP.NET Core application. It is an internal implementation package not meant for direct consumption. Please do not reference directly.
$(MSBuildProjectName) provides a default set of APIs for building an ASP.NET Core application, and also includes API for third-party integrations with ASP.NET Core.
</PackageDescription>
</PropertyGroup>
<ItemGroup>
<PackageProjectReference Include="..\pkg\Microsoft.AspNetCore.All.pkgproj" />
<FrameworkProjectReference Include="..\..\Microsoft.AspNetCore.App\src\Microsoft.AspNetCore.App.shfxproj" />
</ItemGroup>
</Project>

View File

@ -12,7 +12,6 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" Version="$(AspNetCoreImplicitVersion)" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="$(AspNetCoreImplicitVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="$(MicrosoftAspNetCoreRazorDesignPackageVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.AzureAD.UI" Version="$(MicrosoftAspNetCoreAuthenticationAzureADUIPackageVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.AzureADB2C.UI" Version="$(MicrosoftAspNetCoreAuthenticationAzureADB2CUIPackageVersion)" />