Change IIS projects to target netcoreapp3.0 (#4371)
* Change IIS projects to target netcoreapp3.0 #3754
This commit is contained in:
parent
7f1f7a5256
commit
7fdd930f50
|
|
@ -4,7 +4,7 @@
|
||||||
<!-- Using shorter assembly name instead of Microsoft.AspNetCore.Server.Kestrel.Performance because https://github.com/dotnet/BenchmarkDotNet/issues/498 -->
|
<!-- Using shorter assembly name instead of Microsoft.AspNetCore.Server.Kestrel.Performance because https://github.com/dotnet/BenchmarkDotNet/issues/498 -->
|
||||||
<AssemblyName>IIS.Performance</AssemblyName>
|
<AssemblyName>IIS.Performance</AssemblyName>
|
||||||
<RootNamespace>Microsoft.AspNetCore.Server.IIS.Performance</RootNamespace>
|
<RootNamespace>Microsoft.AspNetCore.Server.IIS.Performance</RootNamespace>
|
||||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<ServerGarbageCollection>true</ServerGarbageCollection>
|
<ServerGarbageCollection>true</ServerGarbageCollection>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,7 @@
|
||||||
<MSBuild
|
<MSBuild
|
||||||
Projects="$(StressAppBasePath)\StressTestWebSite.csproj"
|
Projects="$(StressAppBasePath)\StressTestWebSite.csproj"
|
||||||
Targets="Publish"
|
Targets="Publish"
|
||||||
Properties="TargetFramework=netcoreapp2.2;Configuration=$(Configuration);RuntimeIdentifier=win7-%(Platforms.Identity);PublishDir=$(StressAppPublishPath)\%(Identity);BuildProjectReferences=false" />
|
Properties="TargetFramework=netcoreapp3.0;Configuration=$(Configuration);RuntimeIdentifier=win7-%(Platforms.Identity);PublishDir=$(StressAppPublishPath)\%(Identity);BuildProjectReferences=false" />
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<StressAppFiles Include="$(StressAppPublishPath)\**\*" />
|
<StressAppFiles Include="$(StressAppPublishPath)\**\*" />
|
||||||
|
|
|
||||||
|
|
@ -44,26 +44,19 @@
|
||||||
<Copy SourceFiles="$(MSBuildThisFileDirectory)launchSettings.json" DestinationFolder="$(MSBuildProjectDirectory)\Properties" SkipUnchangedFiles="true" />
|
<Copy SourceFiles="$(MSBuildThisFileDirectory)launchSettings.json" DestinationFolder="$(MSBuildProjectDirectory)\Properties" SkipUnchangedFiles="true" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<!-- Deps file injection-->
|
<ItemGroup Condition="('$(InProcessTestSite)' == 'true') AND ('$(ReferenceTestTasks)' != 'false')">
|
||||||
<ItemGroup Condition="('$(InProcessTestSite)' == 'true') AND ('$(ReferenceTestTasks)' != 'false')">
|
|
||||||
<ProjectReference Include="$(MSBuildThisFileDirectory)..\test\TestTasks\TestTasks.csproj">
|
<ProjectReference Include="$(MSBuildThisFileDirectory)..\test\TestTasks\TestTasks.csproj">
|
||||||
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
|
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Target Name="PrepareInjectionApp" Condition="'$(InProcessTestSite)' == 'true'">
|
<Target Name="PrepareInjectionApp" Condition="'$(InProcessTestSite)' == 'true'">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<InjectDepsAssembly>$(MSBuildThisFileDirectory)..\test\TestTasks\bin\$(Configuration)\$(TargetFramework)\TestTasks</InjectDepsAssembly>
|
<InjectDepsAssembly>$(MSBuildThisFileDirectory)..\test\TestTasks\bin\$(Configuration)\$(TargetFramework)\TestTasks</InjectDepsAssembly>
|
||||||
<InjectDepsApp Condition="'$(TargetFramework)' == 'net461'">$(InjectDepsAssembly)</InjectDepsApp>
|
|
||||||
<InjectDepsArguments>"win7-$(NativePlatform)" "$(AncmInProcessRHPath)"</InjectDepsArguments>
|
<InjectDepsArguments>"win7-$(NativePlatform)" "$(AncmInProcessRHPath)"</InjectDepsArguments>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(TargetFramework)' == 'net461'">
|
<PropertyGroup>
|
||||||
<InjectDepsAssembly>$(InjectDepsAssembly).exe</InjectDepsAssembly>
|
|
||||||
<InjectDepsApp>$(InjectDepsAssembly)</InjectDepsApp>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(TargetFramework)' != 'net461'">
|
|
||||||
<InjectDepsAssembly>$(InjectDepsAssembly).dll</InjectDepsAssembly>
|
<InjectDepsAssembly>$(InjectDepsAssembly).dll</InjectDepsAssembly>
|
||||||
<InjectDepsApp>dotnet</InjectDepsApp>
|
<InjectDepsApp>dotnet</InjectDepsApp>
|
||||||
<InjectDepsArguments>$(InjectDepsAssembly) $(InjectDepsArguments)</InjectDepsArguments>
|
<InjectDepsArguments>$(InjectDepsAssembly) $(InjectDepsArguments)</InjectDepsArguments>
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<Import Project="..\..\build\testsite.props" />
|
<Import Project="..\..\build\testsite.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
<InProcessTestSite>true</InProcessTestSite>
|
<InProcessTestSite>true</InProcessTestSite>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -78,17 +78,12 @@ namespace Microsoft.AspNetCore.Server.IIS.Core
|
||||||
return ReadAsyncInternal(new Memory<byte>(buffer, offset, count), cancellationToken).AsTask();
|
return ReadAsyncInternal(new Memory<byte>(buffer, offset, count), cancellationToken).AsTask();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if NETCOREAPP2_1
|
|
||||||
public override ValueTask<int> ReadAsync(Memory<byte> destination, CancellationToken cancellationToken = default)
|
public override ValueTask<int> ReadAsync(Memory<byte> destination, CancellationToken cancellationToken = default)
|
||||||
{
|
{
|
||||||
ValidateState(cancellationToken);
|
ValidateState(cancellationToken);
|
||||||
|
|
||||||
return ReadAsyncInternal(destination, cancellationToken);
|
return ReadAsyncInternal(destination, cancellationToken);
|
||||||
}
|
}
|
||||||
#elif NETSTANDARD2_0
|
|
||||||
#else
|
|
||||||
#error TFMs need to be updated
|
|
||||||
#endif
|
|
||||||
|
|
||||||
private async ValueTask<int> ReadAsyncInternal(Memory<byte> buffer, CancellationToken cancellationToken)
|
private async ValueTask<int> ReadAsyncInternal(Memory<byte> buffer, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -89,17 +89,12 @@ namespace Microsoft.AspNetCore.Server.IIS.Core
|
||||||
return _context.WriteAsync(new ReadOnlyMemory<byte>(buffer, offset, count), cancellationToken);
|
return _context.WriteAsync(new ReadOnlyMemory<byte>(buffer, offset, count), cancellationToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if NETCOREAPP2_1
|
|
||||||
public override ValueTask WriteAsync(ReadOnlyMemory<byte> source, CancellationToken cancellationToken = default)
|
public override ValueTask WriteAsync(ReadOnlyMemory<byte> source, CancellationToken cancellationToken = default)
|
||||||
{
|
{
|
||||||
ValidateState(cancellationToken);
|
ValidateState(cancellationToken);
|
||||||
|
|
||||||
return new ValueTask(_httpResponseControl.WriteAsync(source, cancellationToken));
|
return new ValueTask(_context.WriteAsync(source, cancellationToken));
|
||||||
}
|
}
|
||||||
#elif NETSTANDARD2_0
|
|
||||||
#else
|
|
||||||
#error TFMs need to be updated
|
|
||||||
#endif
|
|
||||||
|
|
||||||
public void StartAcceptingWrites()
|
public void StartAcceptingWrites()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -145,15 +145,10 @@ namespace Microsoft.AspNetCore.Server.IIS.Core
|
||||||
return _requestStream.ReadAsync(buffer, offset, count, cancellationToken);
|
return _requestStream.ReadAsync(buffer, offset, count, cancellationToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if NETCOREAPP2_1
|
|
||||||
public override ValueTask<int> ReadAsync(Memory<byte> destination, CancellationToken cancellationToken = default)
|
public override ValueTask<int> ReadAsync(Memory<byte> destination, CancellationToken cancellationToken = default)
|
||||||
{
|
{
|
||||||
return _requestStream.ReadAsync(destination, cancellationToken);
|
return _requestStream.ReadAsync(destination, cancellationToken);
|
||||||
}
|
}
|
||||||
#elif NETSTANDARD2_0
|
|
||||||
#else
|
|
||||||
#error TFMs need to be updated
|
|
||||||
#endif
|
|
||||||
|
|
||||||
public override Task CopyToAsync(Stream destination, int bufferSize, CancellationToken cancellationToken)
|
public override Task CopyToAsync(Stream destination, int bufferSize, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
|
|
@ -165,15 +160,10 @@ namespace Microsoft.AspNetCore.Server.IIS.Core
|
||||||
return _responseStream.WriteAsync(buffer, offset, count, cancellationToken);
|
return _responseStream.WriteAsync(buffer, offset, count, cancellationToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if NETCOREAPP2_1
|
|
||||||
public override ValueTask WriteAsync(ReadOnlyMemory<byte> source, CancellationToken cancellationToken = default)
|
public override ValueTask WriteAsync(ReadOnlyMemory<byte> source, CancellationToken cancellationToken = default)
|
||||||
{
|
{
|
||||||
return _responseStream.WriteAsync(source, cancellationToken);
|
return _responseStream.WriteAsync(source, cancellationToken);
|
||||||
}
|
}
|
||||||
#elif NETSTANDARD2_0
|
|
||||||
#else
|
|
||||||
#error TFMs need to be updated
|
|
||||||
#endif
|
|
||||||
|
|
||||||
public override long Seek(long offset, SeekOrigin origin)
|
public override long Seek(long offset, SeekOrigin origin)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -68,13 +68,8 @@ namespace Microsoft.AspNetCore.Server.IIS.Core
|
||||||
public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
|
public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
|
||||||
=> _inner.ReadAsync(buffer, offset, count, cancellationToken);
|
=> _inner.ReadAsync(buffer, offset, count, cancellationToken);
|
||||||
|
|
||||||
#if NETCOREAPP2_1
|
|
||||||
public override ValueTask<int> ReadAsync(Memory<byte> destination, CancellationToken cancellationToken = default)
|
public override ValueTask<int> ReadAsync(Memory<byte> destination, CancellationToken cancellationToken = default)
|
||||||
=> _inner.ReadAsync(destination, cancellationToken);
|
=> _inner.ReadAsync(destination, cancellationToken);
|
||||||
#elif NETSTANDARD2_0
|
|
||||||
#else
|
|
||||||
#error TFMs need to be updated
|
|
||||||
#endif
|
|
||||||
|
|
||||||
public override int ReadByte()
|
public override int ReadByte()
|
||||||
=> _inner.ReadByte();
|
=> _inner.ReadByte();
|
||||||
|
|
@ -91,13 +86,8 @@ namespace Microsoft.AspNetCore.Server.IIS.Core
|
||||||
public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
|
public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
|
||||||
=> _inner.WriteAsync(buffer, offset, count, cancellationToken);
|
=> _inner.WriteAsync(buffer, offset, count, cancellationToken);
|
||||||
|
|
||||||
#if NETCOREAPP2_1
|
|
||||||
public override ValueTask WriteAsync(ReadOnlyMemory<byte> source, CancellationToken cancellationToken = default)
|
public override ValueTask WriteAsync(ReadOnlyMemory<byte> source, CancellationToken cancellationToken = default)
|
||||||
=> _inner.WriteAsync(source, cancellationToken);
|
=> _inner.WriteAsync(source, cancellationToken);
|
||||||
#elif NETSTANDARD2_0
|
|
||||||
#else
|
|
||||||
#error TFMs need to be updated
|
|
||||||
#endif
|
|
||||||
|
|
||||||
public override void WriteByte(byte value)
|
public override void WriteByte(byte value)
|
||||||
=> _inner.WriteByte(value);
|
=> _inner.WriteByte(value);
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netstandard2.0</TargetFramework>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
<PackageId>Microsoft.AspNetCore.Server.IIS</PackageId>
|
<PackageId>Microsoft.AspNetCore.Server.IIS</PackageId>
|
||||||
<Description>Provides support for hosting ASP.NET Core in IIS using the AspNetCoreModule.</Description>
|
<Description>Provides support for hosting ASP.NET Core in IIS using the AspNetCoreModule.</Description>
|
||||||
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
<PackageTags>aspnetcore;iis</PackageTags>
|
<PackageTags>aspnetcore;iis</PackageTags>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<PackNativeAssets Condition="'$(OS)' == 'Windows_NT'">true</PackNativeAssets>
|
<PackNativeAssets Condition="'$(OS)' == 'Windows_NT'">true</PackNativeAssets>
|
||||||
<NativeAssetsTargetFramework>netcoreapp2.2</NativeAssetsTargetFramework>
|
<NativeAssetsTargetFramework>netcoreapp3.0</NativeAssetsTargetFramework>
|
||||||
<DisableFastUpToDateCheck>True</DisableFastUpToDateCheck>
|
<DisableFastUpToDateCheck>True</DisableFastUpToDateCheck>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Description>ASP.NET Core components for working with the IIS AspNetCoreModule.</Description>
|
<Description>ASP.NET Core components for working with the IIS AspNetCoreModule.</Description>
|
||||||
<TargetFramework>netstandard2.0</TargetFramework>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
<PackageTags>aspnetcore;iis</PackageTags>
|
<PackageTags>aspnetcore;iis</PackageTags>
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting.IIS
|
||||||
// Start timer
|
// Start timer
|
||||||
StartTimer();
|
StartTimer();
|
||||||
|
|
||||||
// For an unpublished application the dllroot points pre-built dlls like projectdir/bin/debug/net461/
|
// For an unpublished application the dllroot points pre-built dlls like projectdir/bin/debug/netcoreapp3.0/
|
||||||
// and contentRoot points to the project directory so you get things like static assets.
|
// and contentRoot points to the project directory so you get things like static assets.
|
||||||
// For a published app both point to the publish directory.
|
// For a published app both point to the publish directory.
|
||||||
var dllRoot = CheckIfPublishIsRequired();
|
var dllRoot = CheckIfPublishIsRequired();
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netstandard2.0</TargetFramework>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
<PackageId>Microsoft.AspNetCore.Server.IntegrationTesting.IIS</PackageId>
|
<PackageId>Microsoft.AspNetCore.Server.IntegrationTesting.IIS</PackageId>
|
||||||
<!-- Always include a pre-release label since this is an internal-only package. -->
|
<!-- Always include a pre-release label since this is an internal-only package. -->
|
||||||
<Version>$(VersionPrefix)-$(VersionSuffix)</Version>
|
<Version>$(VersionPrefix)-$(VersionSuffix)</Version>
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
||||||
|
|
||||||
public static TestMatrix TestVariants
|
public static TestMatrix TestVariants
|
||||||
=> TestMatrix.ForServers(DeployerSelector.ServerType)
|
=> TestMatrix.ForServers(DeployerSelector.ServerType)
|
||||||
.WithTfms(Tfm.NetCoreApp22)
|
.WithTfms(Tfm.NetCoreApp30)
|
||||||
.WithApplicationTypes(ApplicationType.Portable)
|
.WithApplicationTypes(ApplicationType.Portable)
|
||||||
.WithAllAncmVersions()
|
.WithAllAncmVersions()
|
||||||
.WithAllHostingModels();
|
.WithAllHostingModels();
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests
|
||||||
|
|
||||||
public static TestMatrix TestVariants
|
public static TestMatrix TestVariants
|
||||||
=> TestMatrix.ForServers(DeployerSelector.ServerType)
|
=> TestMatrix.ForServers(DeployerSelector.ServerType)
|
||||||
.WithTfms(Tfm.NetCoreApp22, Tfm.Net461)
|
.WithTfms(Tfm.NetCoreApp30)
|
||||||
.WithAllApplicationTypes()
|
.WithAllApplicationTypes()
|
||||||
.WithAllAncmVersions()
|
.WithAllAncmVersions()
|
||||||
.WithAllHostingModels();
|
.WithAllHostingModels();
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
||||||
|
|
||||||
public static TestMatrix TestVariants
|
public static TestMatrix TestVariants
|
||||||
=> TestMatrix.ForServers(DeployerSelector.ServerType)
|
=> TestMatrix.ForServers(DeployerSelector.ServerType)
|
||||||
.WithTfms(Tfm.NetCoreApp22)
|
.WithTfms(Tfm.NetCoreApp30)
|
||||||
.WithAllApplicationTypes()
|
.WithAllApplicationTypes()
|
||||||
.WithAllAncmVersions()
|
.WithAllAncmVersions()
|
||||||
.WithAllHostingModels();
|
.WithAllHostingModels();
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
||||||
Assert.Equal(
|
Assert.Equal(
|
||||||
new byte[] {
|
new byte[] {
|
||||||
0x1F, 0x8B, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x1F, 0x8B, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x04, 0x0B, 0x63, 0x60, 0xA0, 0x3D, 0x00, 0x00,
|
0x04, 0x0A, 0x63, 0x60, 0xA0, 0x3D, 0x00, 0x00,
|
||||||
0xCA, 0xC6, 0x88, 0x99, 0x64, 0x00, 0x00, 0x00 },
|
0xCA, 0xC6, 0x88, 0x99, 0x64, 0x00, 0x00, 0x00 },
|
||||||
await response.Content.ReadAsByteArrayAsync());
|
await response.Content.ReadAsByteArrayAsync());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
||||||
await _fixture.Client.RetryRequestAsync("/WaitingRequestCount", async message => await message.Content.ReadAsStringAsync() == "0");
|
await _fixture.Client.RetryRequestAsync("/WaitingRequestCount", async message => await message.Content.ReadAsStringAsync() == "0");
|
||||||
}
|
}
|
||||||
|
|
||||||
[ConditionalFact]
|
[ConditionalFact(Skip = "https://github.com/aspnet/AspNetCore/issues/4512")]
|
||||||
public async Task ClientDisconnectCallbackStress()
|
public async Task ClientDisconnectCallbackStress()
|
||||||
{
|
{
|
||||||
// Fixture initialization fails if inside of the Task.Run, so send an
|
// Fixture initialization fails if inside of the Task.Run, so send an
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
||||||
|
|
||||||
public static TestMatrix TestVariants
|
public static TestMatrix TestVariants
|
||||||
=> TestMatrix.ForServers(DeployerSelector.ServerType)
|
=> TestMatrix.ForServers(DeployerSelector.ServerType)
|
||||||
.WithTfms(Tfm.NetCoreApp22)
|
.WithTfms(Tfm.NetCoreApp30)
|
||||||
.WithAllApplicationTypes()
|
.WithAllApplicationTypes()
|
||||||
.WithAncmV2InProcess();
|
.WithAncmV2InProcess();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
||||||
|
|
||||||
public static TestMatrix TestVariants
|
public static TestMatrix TestVariants
|
||||||
=> TestMatrix.ForServers(DeployerSelector.ServerType)
|
=> TestMatrix.ForServers(DeployerSelector.ServerType)
|
||||||
.WithTfms(Tfm.NetCoreApp22)
|
.WithTfms(Tfm.NetCoreApp30)
|
||||||
.WithAllApplicationTypes()
|
.WithAllApplicationTypes()
|
||||||
.WithAncmVersions(AncmVersion.AspNetCoreModuleV2)
|
.WithAncmVersions(AncmVersion.AspNetCoreModuleV2)
|
||||||
.WithAllHostingModels();
|
.WithAllHostingModels();
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
||||||
|
|
||||||
public static TestMatrix TestVariants
|
public static TestMatrix TestVariants
|
||||||
=> TestMatrix.ForServers(DeployerSelector.ServerType)
|
=> TestMatrix.ForServers(DeployerSelector.ServerType)
|
||||||
.WithTfms(Tfm.NetCoreApp22)
|
.WithTfms(Tfm.NetCoreApp30)
|
||||||
.WithApplicationTypes(ApplicationType.Portable)
|
.WithApplicationTypes(ApplicationType.Portable)
|
||||||
.WithAllAncmVersions();
|
.WithAllAncmVersions();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
||||||
|
|
||||||
public static TestMatrix TestVariants
|
public static TestMatrix TestVariants
|
||||||
=> TestMatrix.ForServers(DeployerSelector.ServerType)
|
=> TestMatrix.ForServers(DeployerSelector.ServerType)
|
||||||
.WithTfms(Tfm.NetCoreApp22, Tfm.Net461)
|
.WithTfms(Tfm.NetCoreApp30)
|
||||||
.WithAllApplicationTypes()
|
.WithAllApplicationTypes()
|
||||||
.WithAllAncmVersions();
|
.WithAllAncmVersions();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
||||||
new DeploymentParameters(publisher.ApplicationPath, DeployerSelector.ServerType, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64)
|
new DeploymentParameters(publisher.ApplicationPath, DeployerSelector.ServerType, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64)
|
||||||
{
|
{
|
||||||
HostingModel = hostingModel,
|
HostingModel = hostingModel,
|
||||||
TargetFramework = "netcoreapp2.2",
|
TargetFramework = Tfm.NetCoreApp30,
|
||||||
AncmVersion = AncmVersion.AspNetCoreModuleV2
|
AncmVersion = AncmVersion.AspNetCoreModuleV2
|
||||||
},
|
},
|
||||||
publish);
|
publish);
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
||||||
RuntimeFlavor.CoreClr,
|
RuntimeFlavor.CoreClr,
|
||||||
RuntimeArchitecture.x64)
|
RuntimeArchitecture.x64)
|
||||||
{
|
{
|
||||||
TargetFramework = Tfm.NetCoreApp22,
|
TargetFramework = Tfm.NetCoreApp30,
|
||||||
AncmVersion = AncmVersion.AspNetCoreModuleV2,
|
AncmVersion = AncmVersion.AspNetCoreModuleV2,
|
||||||
HostingModel = HostingModel.InProcess,
|
HostingModel = HostingModel.InProcess,
|
||||||
PublishApplicationBeforeDeployment = true,
|
PublishApplicationBeforeDeployment = true,
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
||||||
|
|
||||||
public static TestMatrix TestVariants
|
public static TestMatrix TestVariants
|
||||||
=> TestMatrix.ForServers(DeployerSelector.ServerType)
|
=> TestMatrix.ForServers(DeployerSelector.ServerType)
|
||||||
.WithTfms(Tfm.NetCoreApp22, Tfm.Net461)
|
.WithTfms(Tfm.NetCoreApp30)
|
||||||
.WithApplicationTypes(ApplicationType.Portable)
|
.WithApplicationTypes(ApplicationType.Portable)
|
||||||
.WithAllAncmVersions()
|
.WithAllAncmVersions()
|
||||||
.WithAllHostingModels();
|
.WithAllHostingModels();
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netcoreapp2.2</TargetFrameworks>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
<IsTestProject>false</IsTestProject>
|
<IsTestProject>false</IsTestProject>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,6 @@
|
||||||
<Project>
|
<Project>
|
||||||
<Import Project="..\Directory.Build.props" />
|
<Import Project="..\Directory.Build.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<!-- These tests are remaining at netcoreapp2.2 because the Benchmarks and functional tests use the same websites.
|
|
||||||
We must leave the benchmarks at 2.1, and if you try to import a project that uses 22 to a 21 project it complains. -->
|
|
||||||
<DeveloperBuildTestTfms>netcoreapp2.2</DeveloperBuildTestTfms>
|
|
||||||
<StandardTestTfms>$(DeveloperBuildTestTfms)</StandardTestTfms>
|
|
||||||
<StandardTestTfms Condition=" '$(DeveloperBuild)' != 'true' ">$(StandardTestTfms)</StandardTestTfms>
|
|
||||||
<StandardTestTfms Condition=" '$(DeveloperBuild)' != 'true' AND '$(OS)' == 'Windows_NT' ">$(StandardTestTfms);net461</StandardTestTfms>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Internal.AspNetCore.Sdk" PrivateAssets="All" Version="$(InternalAspNetCoreSdkPackageVersion)" />
|
<PackageReference Include="Internal.AspNetCore.Sdk" PrivateAssets="All" Version="$(InternalAspNetCoreSdkPackageVersion)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netcoreapp2.2</TargetFrameworks>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
<TestGroupName>IISBackwardsCompatibility.FunctionalTests</TestGroupName>
|
<TestGroupName>IISBackwardsCompatibility.FunctionalTests</TestGroupName>
|
||||||
<DisableFastUpToDateCheck>True</DisableFastUpToDateCheck>
|
<DisableFastUpToDateCheck>True</DisableFastUpToDateCheck>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netcoreapp2.2</TargetFrameworks>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
<TestGroupName>IISForwardsCompatibility.FunctionalTests</TestGroupName>
|
<TestGroupName>IISForwardsCompatibility.FunctionalTests</TestGroupName>
|
||||||
<DisableFastUpToDateCheck>True</DisableFastUpToDateCheck>
|
<DisableFastUpToDateCheck>True</DisableFastUpToDateCheck>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netcoreapp2.2</TargetFrameworks>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
<TestGroupName>IIS.FunctionalTests</TestGroupName>
|
<TestGroupName>IIS.FunctionalTests</TestGroupName>
|
||||||
<DisableFastUpToDateCheck>True</DisableFastUpToDateCheck>
|
<DisableFastUpToDateCheck>True</DisableFastUpToDateCheck>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netcoreapp2.2</TargetFrameworks>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<Import Project="..\..\build\functional-test-assets.targets" />
|
<Import Project="..\..\build\functional-test-assets.targets" />
|
||||||
|
|
@ -11,7 +11,6 @@
|
||||||
<ProjectReference Include="..\Common.Tests\Common.Tests.csproj" />
|
<ProjectReference Include="..\Common.Tests\Common.Tests.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Server.IntegrationTesting" Version="$(MicrosoftAspNetCoreServerIntegrationTestingPackageVersion)" />
|
<PackageReference Include="Microsoft.AspNetCore.Server.IntegrationTesting" Version="$(MicrosoftAspNetCoreServerIntegrationTestingPackageVersion)" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="$(MicrosoftAspNetCoreHostingPackageVersion)" />
|
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="$(MicrosoftAspNetCoreHostingPackageVersion)" />
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
||||||
|
|
||||||
public static TestMatrix TestVariants
|
public static TestMatrix TestVariants
|
||||||
=> TestMatrix.ForServers(DeployerSelector.ServerType)
|
=> TestMatrix.ForServers(DeployerSelector.ServerType)
|
||||||
.WithTfms(Tfm.NetCoreApp22, Tfm.Net461)
|
.WithTfms(Tfm.NetCoreApp30)
|
||||||
.WithAllApplicationTypes()
|
.WithAllApplicationTypes()
|
||||||
.WithAllAncmVersions()
|
.WithAllAncmVersions()
|
||||||
.WithAllHostingModels();
|
.WithAllHostingModels();
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netcoreapp2.2</TargetFrameworks>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
<DisableFastUpToDateCheck>True</DisableFastUpToDateCheck>
|
<DisableFastUpToDateCheck>True</DisableFastUpToDateCheck>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
||||||
|
|
||||||
public static TestMatrix TestVariants
|
public static TestMatrix TestVariants
|
||||||
=> TestMatrix.ForServers(DeployerSelector.ServerType)
|
=> TestMatrix.ForServers(DeployerSelector.ServerType)
|
||||||
.WithTfms(Tfm.NetCoreApp22, Tfm.Net461)
|
.WithTfms(Tfm.NetCoreApp30)
|
||||||
.WithAllAncmVersions();
|
.WithAllAncmVersions();
|
||||||
|
|
||||||
[ConditionalTheory]
|
[ConditionalTheory]
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFrameworks>$(StandardTestTfms)</TargetFrameworks>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
|
<RuntimeIdentifiers>win7-x64;win7-x86</RuntimeIdentifiers>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<Import Project="..\..\..\build\testsite.props" />
|
<Import Project="..\..\..\build\testsite.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netcoreapp2.2</TargetFrameworks>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<Import Project="..\..\..\build\testsite.props" />
|
<Import Project="..\..\..\build\testsite.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netcoreapp2.2</TargetFrameworks>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
<InProcessTestSite>true</InProcessTestSite>
|
<InProcessTestSite>true</InProcessTestSite>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,8 @@
|
||||||
<Import Project="..\..\..\build\testsite.props" />
|
<Import Project="..\..\..\build\testsite.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>$(StandardTestTfms)</TargetFrameworks>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
|
<AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<Import Project="..\..\..\build\testsite.props" />
|
<Import Project="..\..\..\build\testsite.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>$(StandardTestTfms)</TargetFrameworks>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
<InProcessTestSite>true</InProcessTestSite>
|
<InProcessTestSite>true</InProcessTestSite>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
|
using Microsoft.AspNetCore.Builder.Internal;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.IISIntegration.FunctionalTests
|
namespace Microsoft.AspNetCore.IISIntegration.FunctionalTests
|
||||||
|
|
@ -10,6 +12,8 @@ namespace Microsoft.AspNetCore.IISIntegration.FunctionalTests
|
||||||
{
|
{
|
||||||
public static void Register(IApplicationBuilder app, object startup)
|
public static void Register(IApplicationBuilder app, object startup)
|
||||||
{
|
{
|
||||||
|
var delegates = new Dictionary<string, RequestDelegate>();
|
||||||
|
|
||||||
var type = startup.GetType();
|
var type = startup.GetType();
|
||||||
foreach (var method in type.GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance))
|
foreach (var method in type.GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance))
|
||||||
{
|
{
|
||||||
|
|
@ -17,22 +21,40 @@ namespace Microsoft.AspNetCore.IISIntegration.FunctionalTests
|
||||||
if (method.Name != "Configure" &&
|
if (method.Name != "Configure" &&
|
||||||
parameters.Length == 1)
|
parameters.Length == 1)
|
||||||
{
|
{
|
||||||
Action<IApplicationBuilder> appfunc = null;
|
RequestDelegate appfunc = null;
|
||||||
|
|
||||||
if (parameters[0].ParameterType == typeof(IApplicationBuilder))
|
if (parameters[0].ParameterType == typeof(IApplicationBuilder))
|
||||||
{
|
{
|
||||||
appfunc = innerAppBuilder => method.Invoke(startup, new[] { innerAppBuilder });
|
var innerAppBuilder = app.New();
|
||||||
|
method.Invoke(startup, new[] { innerAppBuilder });
|
||||||
|
appfunc = innerAppBuilder.Build();
|
||||||
}
|
}
|
||||||
else if (parameters[0].ParameterType == typeof(HttpContext))
|
else if (parameters[0].ParameterType == typeof(HttpContext))
|
||||||
{
|
{
|
||||||
appfunc = innerAppBuilder => innerAppBuilder.Run(ctx => (Task)method.Invoke(startup, new[] { ctx }));
|
appfunc = context => (Task)method.Invoke(startup, new[] { context });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (appfunc != null)
|
if (appfunc == null)
|
||||||
{
|
{
|
||||||
app.Map("/" + method.Name, appfunc);
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
delegates.Add("/" + method.Name, appfunc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
app.Run(async context => {
|
||||||
|
foreach (var requestDelegate in delegates)
|
||||||
|
{
|
||||||
|
if (context.Request.Path.StartsWithSegments(requestDelegate.Key, out var matchedPath, out var remainingPath))
|
||||||
|
{
|
||||||
|
var pathBase = context.Request.PathBase;
|
||||||
|
context.Request.PathBase = pathBase.Add(matchedPath);
|
||||||
|
context.Request.Path = remainingPath;
|
||||||
|
await requestDelegate.Value(context);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
version:3.0.0-build-20181120.4
|
||||||
|
commithash:84dcc6f0eb5455a3c0305d6d238926defb050889
|
||||||
Loading…
Reference in New Issue