Fixing IIS Tests (#5682)
This commit is contained in:
parent
03cb4a6e14
commit
de954ce702
|
|
@ -130,6 +130,7 @@
|
|||
<MicrosoftAspNetCoreAspNetCoreModuleStablePackageVersion>2.2.0</MicrosoftAspNetCoreAspNetCoreModuleStablePackageVersion>
|
||||
<MicrosoftAspNetCoreAspNetCoreModuleV2StablePackageVersion>2.2.0</MicrosoftAspNetCoreAspNetCoreModuleV2StablePackageVersion>
|
||||
<MicrosoftAspNetIdentityEntityFrameworkPackageVersion>2.2.1</MicrosoftAspNetIdentityEntityFrameworkPackageVersion>
|
||||
<MicrosoftAspNetCoreServerIISStablePackageVersion>2.2.0</MicrosoftAspNetCoreServerIISStablePackageVersion>
|
||||
<MicrosoftAspNetWebApiClientPackageVersion>5.2.6</MicrosoftAspNetWebApiClientPackageVersion>
|
||||
<MicrosoftAzureDocumentDBCorePackageVersion>1.7.1</MicrosoftAzureDocumentDBCorePackageVersion>
|
||||
<MicrosoftAzureKeyVaultPackageVersion>2.3.2</MicrosoftAzureKeyVaultPackageVersion>
|
||||
|
|
|
|||
|
|
@ -18,5 +18,6 @@
|
|||
<Reference Include="Microsoft.AspNetCore" />
|
||||
<Reference Include="Microsoft.AspNetCore.Server.IntegrationTesting" />
|
||||
<Reference Include="Microsoft.AspNetCore.Server.IntegrationTesting.IIS" />
|
||||
<Reference Include="Microsoft.Extensions.Logging.Testing" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ with the right MSBuild incantations to get output copied to the right place.
|
|||
<ItemGroup Condition=" '@(Reference->AnyHaveMetadataValue('Identity', 'AspNetCoreModuleV2'))' == 'true' ">
|
||||
<Reference Remove="AspNetCoreModuleV2" />
|
||||
<NativeProjectReference Include="$(MSBuildThisFileDirectory)src\AspNetCoreModuleV2\AspNetCore\AspNetCore.vcxproj" />
|
||||
<NativeProjectReference Include="$(MSBuildThisFileDirectory)src\AspNetCoreModuleV2\OutOfProcessRequestHandler\OutOfProcessRequestHandler.vcxproj" />
|
||||
<NativeProjectReference Include="$(MSBuildThisFileDirectory)src\AspNetCoreModuleV2\OutOfProcessRequestHandler\OutOfProcessRequestHandler.vcxproj" HandlerPath="2.0.0" />
|
||||
<NativeProjectReference Include="$(MSBuildThisFileDirectory)src\AspNetCoreModuleV2\InProcessRequestHandler\InProcessRequestHandler.vcxproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
@ -26,7 +26,7 @@ with the right MSBuild incantations to get output copied to the right place.
|
|||
<!-- Set the arch-->
|
||||
<SetPlatform>Platform=x64</SetPlatform>
|
||||
<!-- The base path for the output. -->
|
||||
<LinkBase>x64\</LinkBase>
|
||||
<LinkBase>x64\%(HandlerPath)\</LinkBase>
|
||||
<!-- This reference assembly doesn't need -->
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
<!-- NativeContent is a custom type of item group which is assigned a target path after project references are resolved. -->
|
||||
|
|
@ -48,7 +48,7 @@ with the right MSBuild incantations to get output copied to the right place.
|
|||
<!-- Set the arch-->
|
||||
<SetPlatform>Platform=x86</SetPlatform>
|
||||
<!-- The base path for the output. -->
|
||||
<LinkBase>x86\</LinkBase>
|
||||
<LinkBase>x86\%(HandlerPath)\</LinkBase>
|
||||
<!-- This reference assembly doesn't need -->
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
<!-- NativeContent is a custom type of item group which is assigned a target path after project references are resolved. -->
|
||||
|
|
|
|||
|
|
@ -19,9 +19,16 @@
|
|||
<Content Include="$(PackageId).targets" PackagePath="build/$(TargetFramework)/" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="ValidateNativeComponentsBuilt" AfterTargets="Build" >
|
||||
<Error Text="Required dll from ANCM has not been built. To build ANCM, you must use MSBuild.exe."
|
||||
Condition="'$(OS)' == 'Windows_NT' AND !Exists('$(AspNetCoreModuleV2InProcessHandlerDll)')" />
|
||||
</Target>
|
||||
|
||||
<ItemGroup Condition="'$(OS)' == 'Windows_NT' AND '$(VCTargetsPath)' != ''">
|
||||
<NativeProjectReference Include="$(MSBuildThisFileDirectory)..\AspNetCoreModuleV2\InProcessRequestHandler\InProcessRequestHandler.vcxproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="AspNetCoreModule" Condition="'$(OS)' == 'Windows_NT'" />
|
||||
<Reference Include="AspNetCoreModuleV2" Condition="'$(OS)' == 'Windows_NT'" />
|
||||
<Reference Include="Microsoft.AspNetCore.Authentication.Core" />
|
||||
<Reference Include="Microsoft.AspNetCore.Connections.Abstractions" />
|
||||
<Reference Include="Microsoft.AspNetCore.Hosting.Abstractions" />
|
||||
|
|
|
|||
|
|
@ -13,10 +13,25 @@
|
|||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="..\..\build\assets.props" />
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Http.config" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="ValidateNativeComponentsBuilt" AfterTargets="Build" Condition="'$(OS)' == 'Windows_NT'">
|
||||
<Error Text="Required dll from ANCM has not been built. To build ANCM, you must use MSBuild.exe."
|
||||
Condition="!Exists('$(AspNetCoreModuleV1ShimDll)')
|
||||
OR !Exists('$(AspNetCoreModuleV2ShimDll)')
|
||||
OR !Exists('$(AspNetCoreModuleV2OutOfProcessHandlerDll)')" />
|
||||
</Target>
|
||||
|
||||
<ItemGroup Condition="'$(OS)' == 'Windows_NT' AND '$(VCTargetsPath)' != ''">
|
||||
<NativeProjectReference Include="$(MSBuildThisFileDirectory)..\AspNetCoreModuleV1\AspNetCore\AspNetCore.vcxproj" />
|
||||
<NativeProjectReference Include="$(MSBuildThisFileDirectory)..\AspNetCoreModuleV2\AspNetCore\AspNetCore.vcxproj" />
|
||||
<NativeProjectReference Include="$(MSBuildThisFileDirectory)..\AspNetCoreModuleV2\OutOfProcessRequestHandler\OutOfProcessRequestHandler.vcxproj" HandlerPath="2.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="$(RepositoryRoot)src\Hosting\Server.IntegrationTesting\src\Microsoft.AspNetCore.Server.IntegrationTesting.csproj" />
|
||||
<Reference Include="Microsoft.NETCore.Windows.ApiSets" />
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
|||
|
||||
public static string GetTestWebSitePath(string name)
|
||||
{
|
||||
return Path.Combine(TestPathUtilities.GetSolutionRootDirectory("IISIntegration"),"test", "WebSites", name);
|
||||
return Path.Combine(TestPathUtilities.GetSolutionRootDirectory("IISIntegration"),"test", "testassets", name);
|
||||
}
|
||||
|
||||
public static string GetInProcessTestSitesPath()
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
|||
{
|
||||
}
|
||||
|
||||
public IISTestSiteFixture(Action<IISDeploymentParameters> configure)
|
||||
internal IISTestSiteFixture(Action<IISDeploymentParameters> configure)
|
||||
{
|
||||
var logging = AssemblyTestLog.ForAssembly(typeof(IISTestSiteFixture).Assembly);
|
||||
_loggerFactory = logging.CreateLoggerFactory(null, nameof(IISTestSiteFixture));
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
|||
{
|
||||
if (handle.ModuleName == "aspnetcorev2.dll")
|
||||
{
|
||||
Assert.Equal("12.2.18287.0", handle.FileVersionInfo.FileVersion);
|
||||
Assert.Equal("12.2.18316.0", handle.FileVersionInfo.FileVersion);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
|||
{
|
||||
if (handle.ModuleName == "aspnetcorev2_inprocess.dll")
|
||||
{
|
||||
Assert.Equal("12.2.18287.0", handle.FileVersionInfo.FileVersion);
|
||||
Assert.Equal("12.2.18316.0", handle.FileVersionInfo.FileVersion);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,8 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
|||
private const string HWebCoreDll = "hwebcore.dll";
|
||||
|
||||
internal static string HostableWebCoreLocation => Environment.ExpandEnvironmentVariables($@"%windir%\system32\inetsrv\{HWebCoreDll}");
|
||||
internal static string BasePath => Path.GetDirectoryName(new Uri(typeof(TestServer).Assembly.CodeBase).AbsolutePath);
|
||||
internal static string BasePath => Path.Combine(Path.GetDirectoryName(new Uri(typeof(TestServer).Assembly.CodeBase).AbsolutePath),
|
||||
Environment.Is64BitProcess ? "x64" : "x86");
|
||||
|
||||
internal static string AspNetCoreModuleLocation => Path.Combine(BasePath, AspNetCoreModuleDll);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp2.2</TargetFrameworks>
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.AspNetCore.Server.IIS" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Server.IIS" Version="$(MicrosoftAspNetCoreServerIISStablePackageVersion)" />
|
||||
<Reference Include="Microsoft.AspNetCore.ResponseCompression" />
|
||||
<Reference Include="Microsoft.AspNetCore.Hosting" />
|
||||
<Reference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" />
|
||||
|
|
|
|||
Loading…
Reference in New Issue