Merge remote-tracking branch 'Metapackages/rybrande/masterToSrc' into rybrande/Mondo22ToMaster
This commit is contained in:
commit
c8dddaaafc
|
|
@ -1,10 +1,6 @@
|
||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">$(MicrosoftNETCoreApp20PackageVersion)</RuntimeFrameworkVersion>
|
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp3.0' ">$(MicrosoftNETCoreAppPackageVersion)</RuntimeFrameworkVersion>
|
||||||
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">$(MicrosoftNETCoreApp21PackageVersion)</RuntimeFrameworkVersion>
|
|
||||||
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp2.2' ">$(MicrosoftNETCoreApp22PackageVersion)</RuntimeFrameworkVersion>
|
|
||||||
<NETStandardImplicitPackageVersion Condition=" '$(TargetFramework)' == 'netstandard2.0' ">$(NETStandardLibrary20PackageVersion)</NETStandardImplicitPackageVersion>
|
<NETStandardImplicitPackageVersion Condition=" '$(TargetFramework)' == 'netstandard2.0' ">$(NETStandardLibrary20PackageVersion)</NETStandardImplicitPackageVersion>
|
||||||
<!-- aspnet/BuildTools#662 Don't police what version of NetCoreApp we use -->
|
|
||||||
<NETCoreAppMaximumVersion>99.9</NETCoreAppMaximumVersion>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
Meta packages
|
Meta Packages [Archived]
|
||||||
========
|
========================
|
||||||
|
|
||||||
|
**This GitHub project has been archived.** Ongoing development on this project can be found in https://github.com/aspnet/AspNetCore.
|
||||||
|
|
||||||
This repo contains NuGet meta packages that help quickly reference sets of common packages.
|
This repo contains NuGet meta packages that help quickly reference sets of common packages.
|
||||||
|
|
||||||
This project is part of ASP.NET Core. You can find samples, documentation and getting started instructions for ASP.NET Core at the [Home](https://github.com/aspnet/home) repo.
|
This project is part of ASP.NET Core. You can find samples, documentation and getting started instructions for ASP.NET Core at the [AspNetCore](https://github.com/aspnet/AspNetCore) repo.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,39 +3,40 @@
|
||||||
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
|
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Label="Package Versions">
|
<PropertyGroup Label="Package Versions">
|
||||||
<InternalAspNetCoreSdkPackageVersion>2.2.0-preview2-20181004.6</InternalAspNetCoreSdkPackageVersion>
|
<InternalAspNetCoreSdkPackageVersion>3.0.0-alpha1-20181004.7</InternalAspNetCoreSdkPackageVersion>
|
||||||
<MicrosoftAspNetCoreAspNetCoreModulePackageVersion>2.2.0-preview3-35425</MicrosoftAspNetCoreAspNetCoreModulePackageVersion>
|
<MicrosoftAspNetCoreAspNetCoreModulePackageVersion>3.0.0-alpha1-10733</MicrosoftAspNetCoreAspNetCoreModulePackageVersion>
|
||||||
<MicrosoftAspNetCoreAspNetCoreModuleV2PackageVersion>2.2.0-preview3-35425</MicrosoftAspNetCoreAspNetCoreModuleV2PackageVersion>
|
<MicrosoftAspNetCoreAspNetCoreModuleV2PackageVersion>3.0.0-alpha1-10733</MicrosoftAspNetCoreAspNetCoreModuleV2PackageVersion>
|
||||||
<MicrosoftAspNetCoreDiagnosticsPackageVersion>2.2.0-preview3-35425</MicrosoftAspNetCoreDiagnosticsPackageVersion>
|
<MicrosoftAspNetCoreDiagnosticsPackageVersion>3.0.0-alpha1-10733</MicrosoftAspNetCoreDiagnosticsPackageVersion>
|
||||||
<MicrosoftAspNetCoreHostFilteringPackageVersion>2.2.0-preview3-35425</MicrosoftAspNetCoreHostFilteringPackageVersion>
|
<MicrosoftAspNetCoreHostFilteringPackageVersion>3.0.0-alpha1-10733</MicrosoftAspNetCoreHostFilteringPackageVersion>
|
||||||
<MicrosoftAspNetCoreHostingPackageVersion>2.2.0-preview3-35425</MicrosoftAspNetCoreHostingPackageVersion>
|
<MicrosoftAspNetCoreHostingPackageVersion>3.0.0-alpha1-10733</MicrosoftAspNetCoreHostingPackageVersion>
|
||||||
<MicrosoftAspNetCoreRoutingPackageVersion>2.2.0-preview3-35425</MicrosoftAspNetCoreRoutingPackageVersion>
|
<MicrosoftAspNetCoreRoutingPackageVersion>3.0.0-alpha1-10733</MicrosoftAspNetCoreRoutingPackageVersion>
|
||||||
<MicrosoftAspNetCoreServerIISIntegrationPackageVersion>2.2.0-preview3-35425</MicrosoftAspNetCoreServerIISIntegrationPackageVersion>
|
<MicrosoftAspNetCoreServerIISIntegrationPackageVersion>3.0.0-alpha1-10733</MicrosoftAspNetCoreServerIISIntegrationPackageVersion>
|
||||||
<MicrosoftAspNetCoreServerIISPackageVersion>2.2.0-preview3-35425</MicrosoftAspNetCoreServerIISPackageVersion>
|
<MicrosoftAspNetCoreServerIISPackageVersion>3.0.0-alpha1-10733</MicrosoftAspNetCoreServerIISPackageVersion>
|
||||||
<MicrosoftAspNetCoreServerIntegrationTestingIISPackageVersion>2.2.0-preview3-35425</MicrosoftAspNetCoreServerIntegrationTestingIISPackageVersion>
|
<MicrosoftAspNetCoreServerIntegrationTestingIISPackageVersion>3.0.0-alpha1-10733</MicrosoftAspNetCoreServerIntegrationTestingIISPackageVersion>
|
||||||
<MicrosoftAspNetCoreServerIntegrationTestingPackageVersion>0.6.0-preview3-35425</MicrosoftAspNetCoreServerIntegrationTestingPackageVersion>
|
<MicrosoftAspNetCoreServerIntegrationTestingPackageVersion>0.7.0-alpha1-10733</MicrosoftAspNetCoreServerIntegrationTestingPackageVersion>
|
||||||
<MicrosoftAspNetCoreServerKestrelHttpsPackageVersion>2.2.0-preview3-35425</MicrosoftAspNetCoreServerKestrelHttpsPackageVersion>
|
<MicrosoftAspNetCoreServerKestrelHttpsPackageVersion>3.0.0-alpha1-10733</MicrosoftAspNetCoreServerKestrelHttpsPackageVersion>
|
||||||
<MicrosoftAspNetCoreServerKestrelPackageVersion>2.2.0-preview3-35425</MicrosoftAspNetCoreServerKestrelPackageVersion>
|
<MicrosoftAspNetCoreServerKestrelPackageVersion>3.0.0-alpha1-10733</MicrosoftAspNetCoreServerKestrelPackageVersion>
|
||||||
<MicrosoftAspNetCoreStaticFilesPackageVersion>2.2.0-preview3-35425</MicrosoftAspNetCoreStaticFilesPackageVersion>
|
<MicrosoftAspNetCoreStaticFilesPackageVersion>3.0.0-alpha1-10733</MicrosoftAspNetCoreStaticFilesPackageVersion>
|
||||||
<MicrosoftExtensionsConfigurationCommandLinePackageVersion>2.2.0-preview3-35425</MicrosoftExtensionsConfigurationCommandLinePackageVersion>
|
<MicrosoftExtensionsConfigurationCommandLinePackageVersion>3.0.0-preview-181108-06</MicrosoftExtensionsConfigurationCommandLinePackageVersion>
|
||||||
<MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>2.2.0-preview3-35425</MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>
|
<MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>3.0.0-preview-181108-06</MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>
|
||||||
<MicrosoftExtensionsConfigurationFileExtensionsPackageVersion>2.2.0-preview3-35425</MicrosoftExtensionsConfigurationFileExtensionsPackageVersion>
|
<MicrosoftExtensionsConfigurationFileExtensionsPackageVersion>3.0.0-preview-181108-06</MicrosoftExtensionsConfigurationFileExtensionsPackageVersion>
|
||||||
<MicrosoftExtensionsConfigurationJsonPackageVersion>2.2.0-preview3-35425</MicrosoftExtensionsConfigurationJsonPackageVersion>
|
<MicrosoftExtensionsConfigurationJsonPackageVersion>3.0.0-preview-181108-06</MicrosoftExtensionsConfigurationJsonPackageVersion>
|
||||||
<MicrosoftExtensionsConfigurationUserSecretsPackageVersion>2.2.0-preview3-35425</MicrosoftExtensionsConfigurationUserSecretsPackageVersion>
|
<MicrosoftExtensionsConfigurationUserSecretsPackageVersion>3.0.0-preview-181108-06</MicrosoftExtensionsConfigurationUserSecretsPackageVersion>
|
||||||
<MicrosoftExtensionsLoggingConfigurationPackageVersion>2.2.0-preview3-35425</MicrosoftExtensionsLoggingConfigurationPackageVersion>
|
<MicrosoftExtensionsLoggingConfigurationPackageVersion>3.0.0-preview-181108-06</MicrosoftExtensionsLoggingConfigurationPackageVersion>
|
||||||
<MicrosoftExtensionsLoggingConsolePackageVersion>2.2.0-preview3-35425</MicrosoftExtensionsLoggingConsolePackageVersion>
|
<MicrosoftExtensionsLoggingConsolePackageVersion>3.0.0-preview-181108-06</MicrosoftExtensionsLoggingConsolePackageVersion>
|
||||||
<MicrosoftExtensionsLoggingDebugPackageVersion>2.2.0-preview3-35425</MicrosoftExtensionsLoggingDebugPackageVersion>
|
<MicrosoftExtensionsLoggingDebugPackageVersion>3.0.0-preview-181108-06</MicrosoftExtensionsLoggingDebugPackageVersion>
|
||||||
<MicrosoftExtensionsLoggingEventSourcePackageVersion>2.2.0-preview3-35425</MicrosoftExtensionsLoggingEventSourcePackageVersion>
|
<MicrosoftExtensionsLoggingEventSourcePackageVersion>3.0.0-preview-181108-06</MicrosoftExtensionsLoggingEventSourcePackageVersion>
|
||||||
<MicrosoftExtensionsLoggingPackageVersion>2.2.0-preview3-35425</MicrosoftExtensionsLoggingPackageVersion>
|
<MicrosoftExtensionsLoggingPackageVersion>3.0.0-preview-181108-06</MicrosoftExtensionsLoggingPackageVersion>
|
||||||
|
<MicrosoftExtensionsHostingPackageVersion>3.0.0-alpha1-10733</MicrosoftExtensionsHostingPackageVersion>
|
||||||
<MicrosoftNETCoreApp20PackageVersion>2.0.9</MicrosoftNETCoreApp20PackageVersion>
|
<MicrosoftNETCoreApp20PackageVersion>2.0.9</MicrosoftNETCoreApp20PackageVersion>
|
||||||
<MicrosoftNETCoreApp21PackageVersion>2.1.3</MicrosoftNETCoreApp21PackageVersion>
|
<MicrosoftNETCoreApp21PackageVersion>2.1.3</MicrosoftNETCoreApp21PackageVersion>
|
||||||
<MicrosoftNETCoreApp22PackageVersion>2.2.0-preview3-27001-02</MicrosoftNETCoreApp22PackageVersion>
|
<MicrosoftNETCoreApp22PackageVersion>2.2.0-rtm-27105-02</MicrosoftNETCoreApp22PackageVersion>
|
||||||
<MicrosoftNETTestSdkPackageVersion>15.6.1</MicrosoftNETTestSdkPackageVersion>
|
<MicrosoftNETTestSdkPackageVersion>15.6.1</MicrosoftNETTestSdkPackageVersion>
|
||||||
<MoqPackageVersion>4.7.49</MoqPackageVersion>
|
<MoqPackageVersion>4.10.0</MoqPackageVersion>
|
||||||
<NETStandardLibrary20PackageVersion>2.0.3</NETStandardLibrary20PackageVersion>
|
<NETStandardLibrary20PackageVersion>2.0.3</NETStandardLibrary20PackageVersion>
|
||||||
<XunitPackageVersion>2.3.1</XunitPackageVersion>
|
<XunitPackageVersion>2.3.1</XunitPackageVersion>
|
||||||
<XunitRunnerVisualStudioPackageVersion>2.4.0</XunitRunnerVisualStudioPackageVersion>
|
<XunitRunnerVisualStudioPackageVersion>2.4.0</XunitRunnerVisualStudioPackageVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(DotNetPackageVersionPropsPath)" Condition=" '$(DotNetPackageVersionPropsPath)' != '' " />
|
|
||||||
<PropertyGroup Label="Package Versions: Pinned" />
|
<PropertyGroup Label="Package Versions: Pinned" />
|
||||||
|
<Import Project="$(DotNetPackageVersionPropsPath)" Condition=" '$(DotNetPackageVersionPropsPath)' != '' " />
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,10 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<!-- These properties are use by the automation that updates dependencies.props -->
|
<!-- These properties are use by the automation that updates dependencies.props -->
|
||||||
<LineupPackageId>Internal.AspNetCore.Universe.Lineup</LineupPackageId>
|
<LineupPackageId>Internal.AspNetCore.Universe.Lineup</LineupPackageId>
|
||||||
<LineupPackageVersion>2.2.0-*</LineupPackageVersion>
|
|
||||||
<LineupPackageRestoreSource>https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json</LineupPackageRestoreSource>
|
<LineupPackageRestoreSource>https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json</LineupPackageRestoreSource>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp20PackageVersion)" />
|
<DotNetCoreRuntime Include="$(MicrosoftNETCoreAppPackageVersion)" />
|
||||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp21PackageVersion)" />
|
|
||||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp22PackageVersion)" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,8 @@ using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Routing;
|
using Microsoft.AspNetCore.Routing;
|
||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
|
using Microsoft.Extensions.Hosting;
|
||||||
|
|
||||||
namespace SampleApp
|
namespace SampleApp
|
||||||
{
|
{
|
||||||
|
|
@ -23,6 +25,8 @@ namespace SampleApp
|
||||||
CustomApplicationBuilder();
|
CustomApplicationBuilder();
|
||||||
|
|
||||||
StartupClass(args);
|
StartupClass(args);
|
||||||
|
|
||||||
|
HostBuilderWithWebHost(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void HelloWorld()
|
private static void HelloWorld()
|
||||||
|
|
@ -90,5 +94,21 @@ namespace SampleApp
|
||||||
host.Run();
|
host.Run();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void HostBuilderWithWebHost(string[] args)
|
||||||
|
{
|
||||||
|
var host = new HostBuilder()
|
||||||
|
.ConfigureAppConfiguration(config =>
|
||||||
|
{
|
||||||
|
config.AddCommandLine(args);
|
||||||
|
})
|
||||||
|
.ConfigureWebHostDefaults(builder =>
|
||||||
|
{
|
||||||
|
builder.UseStartup<Startup>();
|
||||||
|
})
|
||||||
|
.Build();
|
||||||
|
|
||||||
|
host.Run();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netcoreapp2.2;net461</TargetFrameworks>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
<UserSecretsId>aspnetcore-MetaPackagesSampleApp-20170406180413</UserSecretsId>
|
<UserSecretsId>aspnetcore-MetaPackagesSampleApp-20170406180413</UserSecretsId>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="$(MicrosoftAspNetCoreStaticFilesPackageVersion)" />
|
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="$(MicrosoftAspNetCoreStaticFilesPackageVersion)" />
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Hosting" Version="$(MicrosoftExtensionsHostingPackageVersion)" />
|
||||||
<ProjectReference Include="..\..\src\Microsoft.AspNetCore\Microsoft.AspNetCore.csproj" />
|
<ProjectReference Include="..\..\src\Microsoft.AspNetCore\Microsoft.AspNetCore.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
using System;
|
||||||
|
using Microsoft.AspNetCore.Hosting;
|
||||||
|
using Microsoft.AspNetCore;
|
||||||
|
|
||||||
|
namespace Microsoft.Extensions.Hosting
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Extension methods for configuring the IWebHostBuilder.
|
||||||
|
/// </summary>
|
||||||
|
public static class GenericHostBuilderExtensions
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="IWebHostBuilder"/> class with pre-configured defaults.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// The following defaults are applied to the <see cref="IWebHostBuilder"/>:
|
||||||
|
/// use Kestrel as the web server and configure it using the application's configuration providers,
|
||||||
|
/// and enable IIS integration.
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="builder">The <see cref="IHostBuilder" /> instance to configure</param>
|
||||||
|
/// <param name="configure">The configure callback</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static IHostBuilder ConfigureWebHostDefaults(this IHostBuilder builder, Action<IWebHostBuilder> configure)
|
||||||
|
{
|
||||||
|
return builder.ConfigureWebHost(webHostBuilder =>
|
||||||
|
{
|
||||||
|
WebHost.ConfigureWebDefaults(webHostBuilder);
|
||||||
|
|
||||||
|
configure(webHostBuilder);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netstandard2.0</TargetFrameworks>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
<PackageTags>aspnetcore</PackageTags>
|
<PackageTags>aspnetcore</PackageTags>
|
||||||
<Description>Microsoft.AspNetCore</Description>
|
<Description>Microsoft.AspNetCore</Description>
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
|
|
|
||||||
|
|
@ -158,69 +158,75 @@ namespace Microsoft.AspNetCore
|
||||||
builder.UseConfiguration(new ConfigurationBuilder().AddCommandLine(args).Build());
|
builder.UseConfiguration(new ConfigurationBuilder().AddCommandLine(args).Build());
|
||||||
}
|
}
|
||||||
|
|
||||||
builder.UseKestrel((builderContext, options) =>
|
builder.ConfigureAppConfiguration((hostingContext, config) =>
|
||||||
{
|
{
|
||||||
options.Configure(builderContext.Configuration.GetSection("Kestrel"));
|
var env = hostingContext.HostingEnvironment;
|
||||||
})
|
|
||||||
.ConfigureAppConfiguration((hostingContext, config) =>
|
|
||||||
{
|
|
||||||
var env = hostingContext.HostingEnvironment;
|
|
||||||
|
|
||||||
config.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
|
config.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
|
||||||
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true, reloadOnChange: true);
|
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true, reloadOnChange: true);
|
||||||
|
|
||||||
if (env.IsDevelopment())
|
if (env.IsDevelopment())
|
||||||
|
{
|
||||||
|
var appAssembly = Assembly.Load(new AssemblyName(env.ApplicationName));
|
||||||
|
if (appAssembly != null)
|
||||||
{
|
{
|
||||||
var appAssembly = Assembly.Load(new AssemblyName(env.ApplicationName));
|
config.AddUserSecrets(appAssembly, optional: true);
|
||||||
if (appAssembly != null)
|
|
||||||
{
|
|
||||||
config.AddUserSecrets(appAssembly, optional: true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
config.AddEnvironmentVariables();
|
config.AddEnvironmentVariables();
|
||||||
|
|
||||||
if (args != null)
|
if (args != null)
|
||||||
{
|
|
||||||
config.AddCommandLine(args);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.ConfigureLogging((hostingContext, logging) =>
|
|
||||||
{
|
{
|
||||||
logging.AddConfiguration(hostingContext.Configuration.GetSection("Logging"));
|
config.AddCommandLine(args);
|
||||||
logging.AddConsole();
|
}
|
||||||
logging.AddDebug();
|
})
|
||||||
logging.AddEventSourceLogger();
|
.ConfigureLogging((hostingContext, logging) =>
|
||||||
})
|
{
|
||||||
.ConfigureServices((hostingContext, services) =>
|
logging.AddConfiguration(hostingContext.Configuration.GetSection("Logging"));
|
||||||
{
|
logging.AddConsole();
|
||||||
// Fallback
|
logging.AddDebug();
|
||||||
services.PostConfigure<HostFilteringOptions>(options =>
|
logging.AddEventSourceLogger();
|
||||||
{
|
}).
|
||||||
if (options.AllowedHosts == null || options.AllowedHosts.Count == 0)
|
UseDefaultServiceProvider((context, options) =>
|
||||||
{
|
{
|
||||||
// "AllowedHosts": "localhost;127.0.0.1;[::1]"
|
options.ValidateScopes = context.HostingEnvironment.IsDevelopment();
|
||||||
var hosts = hostingContext.Configuration["AllowedHosts"]?.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
|
});
|
||||||
// Fall back to "*" to disable.
|
|
||||||
options.AllowedHosts = (hosts?.Length > 0 ? hosts : new[] { "*" });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// Change notification
|
|
||||||
services.AddSingleton<IOptionsChangeTokenSource<HostFilteringOptions>>(
|
|
||||||
new ConfigurationChangeTokenSource<HostFilteringOptions>(hostingContext.Configuration));
|
|
||||||
|
|
||||||
services.AddTransient<IStartupFilter, HostFilteringStartupFilter>();
|
ConfigureWebDefaults(builder);
|
||||||
})
|
|
||||||
.UseIIS()
|
|
||||||
.UseIISIntegration()
|
|
||||||
.UseDefaultServiceProvider((context, options) =>
|
|
||||||
{
|
|
||||||
options.ValidateScopes = context.HostingEnvironment.IsDevelopment();
|
|
||||||
});
|
|
||||||
|
|
||||||
return builder;
|
return builder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal static void ConfigureWebDefaults(IWebHostBuilder builder)
|
||||||
|
{
|
||||||
|
builder.UseKestrel((builderContext, options) =>
|
||||||
|
{
|
||||||
|
options.Configure(builderContext.Configuration.GetSection("Kestrel"));
|
||||||
|
})
|
||||||
|
.ConfigureServices((hostingContext, services) =>
|
||||||
|
{
|
||||||
|
// Fallback
|
||||||
|
services.PostConfigure<HostFilteringOptions>(options =>
|
||||||
|
{
|
||||||
|
if (options.AllowedHosts == null || options.AllowedHosts.Count == 0)
|
||||||
|
{
|
||||||
|
// "AllowedHosts": "localhost;127.0.0.1;[::1]"
|
||||||
|
var hosts = hostingContext.Configuration["AllowedHosts"]?.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
|
// Fall back to "*" to disable.
|
||||||
|
options.AllowedHosts = (hosts?.Length > 0 ? hosts : new[] { "*" });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// Change notification
|
||||||
|
services.AddSingleton<IOptionsChangeTokenSource<HostFilteringOptions>>(
|
||||||
|
new ConfigurationChangeTokenSource<HostFilteringOptions>(hostingContext.Configuration));
|
||||||
|
|
||||||
|
services.AddTransient<IStartupFilter, HostFilteringStartupFilter>();
|
||||||
|
})
|
||||||
|
.UseIIS()
|
||||||
|
.UseIISIntegration();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="WebHostBuilder"/> class with pre-configured defaults using typed Startup.
|
/// Initializes a new instance of the <see cref="WebHostBuilder"/> class with pre-configured defaults using typed Startup.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,6 @@
|
||||||
<Project>
|
<Project>
|
||||||
<Import Project="..\Directory.Build.props" />
|
<Import Project="..\Directory.Build.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<DeveloperBuildTestTfms>netcoreapp2.2</DeveloperBuildTestTfms>
|
|
||||||
<StandardTestTfms>$(DeveloperBuildTestTfms)</StandardTestTfms>
|
|
||||||
|
|
||||||
<StandardTestTfms Condition=" '$(DeveloperBuild)' != 'true' AND '$(OS)' == 'Windows_NT' ">$(StandardTestTfms);net461</StandardTestTfms>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Internal.AspNetCore.Sdk" Version="$(InternalAspNetCoreSdkPackageVersion)" PrivateAssets="All" />
|
<PackageReference Include="Internal.AspNetCore.Sdk" Version="$(InternalAspNetCoreSdkPackageVersion)" PrivateAssets="All" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>$(StandardTestTfms)</TargetFrameworks>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
|
|
||||||
<!--
|
|
||||||
Workaround for "Use executable flags in Microsoft.NET.Test.Sdk" (https://github.com/Microsoft/vstest/issues/792).
|
|
||||||
Remove when fixed.
|
|
||||||
-->
|
|
||||||
<HasRuntimeOutput>true</HasRuntimeOutput>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -158,7 +158,7 @@ namespace Microsoft.AspNetCore.Tests
|
||||||
var applicationName = "CreateDefaultBuilderApp";
|
var applicationName = "CreateDefaultBuilderApp";
|
||||||
var deploymentParameters = new DeploymentParameters(Path.Combine(GetTestSitesPath(), applicationName), ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64)
|
var deploymentParameters = new DeploymentParameters(Path.Combine(GetTestSitesPath(), applicationName), ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64)
|
||||||
{
|
{
|
||||||
TargetFramework = "netcoreapp2.2",
|
TargetFramework = "netcoreapp3.0",
|
||||||
HostingModel = HostingModel.InProcess,
|
HostingModel = HostingModel.InProcess,
|
||||||
AncmVersion = AncmVersion.AspNetCoreModuleV2
|
AncmVersion = AncmVersion.AspNetCoreModuleV2
|
||||||
};
|
};
|
||||||
|
|
@ -212,7 +212,10 @@ namespace Microsoft.AspNetCore.Tests
|
||||||
bool setTestEnvVars = false,
|
bool setTestEnvVars = false,
|
||||||
string environment = "Development")
|
string environment = "Development")
|
||||||
{
|
{
|
||||||
var deploymentParameters = new DeploymentParameters(Path.Combine(GetTestSitesPath(), applicationName), ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64);
|
var deploymentParameters = new DeploymentParameters(Path.Combine(GetTestSitesPath(), applicationName), ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64)
|
||||||
|
{
|
||||||
|
TargetFramework = "netcoreapp3.0",
|
||||||
|
};
|
||||||
|
|
||||||
if (setTestEnvVars)
|
if (setTestEnvVars)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>$(StandardTestTfms)</TargetFrameworks>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
<UserSecretsId>aspnetcore-CreateDefaultBuilder-20170424224131</UserSecretsId>
|
<UserSecretsId>aspnetcore-CreateDefaultBuilder-20170424224131</UserSecretsId>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
<UserSecretsId>aspnetcore-CreateDefaultBuilderOfT-20170424224131</UserSecretsId>
|
<UserSecretsId>aspnetcore-CreateDefaultBuilderOfT-20170424224131</UserSecretsId>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VersionPrefix>2.2.0</VersionPrefix>
|
<VersionPrefix>3.0.0</VersionPrefix>
|
||||||
<VersionSuffix>rtm</VersionSuffix>
|
<VersionSuffix>alpha1</VersionSuffix>
|
||||||
<PackageVersion Condition="'$(IsFinalBuild)' == 'true' AND ('$(VersionSuffix)' == 'servicing' OR '$(VersionSuffix)' == 'rtm') ">$(VersionPrefix)</PackageVersion>
|
<PackageVersion Condition="'$(IsFinalBuild)' == 'true' AND ('$(VersionSuffix)' == 'servicing' OR '$(VersionSuffix)' == 'rtm') ">$(VersionPrefix)</PackageVersion>
|
||||||
<PackageVersion Condition="'$(IsFinalBuild)' == 'true' AND '$(VersionSuffix)' != 'servicing' AND '$(VersionSuffix)' != 'rtm' ">$(VersionPrefix)-$(VersionSuffix)-final</PackageVersion>
|
<PackageVersion Condition="'$(IsFinalBuild)' == 'true' AND '$(VersionSuffix)' != 'servicing' AND '$(VersionSuffix)' != 'rtm' ">$(VersionPrefix)-$(VersionSuffix)-final</PackageVersion>
|
||||||
<BuildNumber Condition="'$(BuildNumber)' == ''">t000</BuildNumber>
|
<BuildNumber Condition="'$(BuildNumber)' == ''">t000</BuildNumber>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue