Converted test projects and samples to run on netcoreapp2.0
This commit is contained in:
parent
9e9dc727ca
commit
7124247b50
|
|
@ -3,6 +3,7 @@
|
||||||
<AspNetCoreVersion>1.2.0-*</AspNetCoreVersion>
|
<AspNetCoreVersion>1.2.0-*</AspNetCoreVersion>
|
||||||
<CoreFxVersion>4.3.0</CoreFxVersion>
|
<CoreFxVersion>4.3.0</CoreFxVersion>
|
||||||
<NetStandardImplicitPackageVersion>1.6.1</NetStandardImplicitPackageVersion>
|
<NetStandardImplicitPackageVersion>1.6.1</NetStandardImplicitPackageVersion>
|
||||||
|
<RuntimeFrameworkVersion>2.0.0-*</RuntimeFrameworkVersion>
|
||||||
<SystemReflectionMetadataVersion>1.4.2</SystemReflectionMetadataVersion>
|
<SystemReflectionMetadataVersion>1.4.2</SystemReflectionMetadataVersion>
|
||||||
<TestSdkVersion>15.0.0</TestSdkVersion>
|
<TestSdkVersion>15.0.0</TestSdkVersion>
|
||||||
<WebAdministrationVersion>7.0.0</WebAdministrationVersion>
|
<WebAdministrationVersion>7.0.0</WebAdministrationVersion>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<Import Project="..\..\build\dependencies.props" />
|
<Import Project="..\..\build\dependencies.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net451;netcoreapp1.1</TargetFrameworks>
|
<TargetFrameworks>net451;netcoreapp2.0</TargetFrameworks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<Import Project="..\..\build\common.props" />
|
<Import Project="..\..\build\common.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp1.1</TargetFramework>
|
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@
|
||||||
<Import Project="..\..\build\common.props" />
|
<Import Project="..\..\build\common.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net452;netcoreapp1.1</TargetFrameworks>
|
<TargetFrameworks>netcoreapp2.0;net452</TargetFrameworks>
|
||||||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp1.1</TargetFrameworks>
|
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -43,8 +43,11 @@ namespace Microsoft.AspNetCore.Hosting.Internal
|
||||||
var eventData = eventListener.EventData;
|
var eventData = eventListener.EventData;
|
||||||
Assert.NotNull(eventData);
|
Assert.NotNull(eventData);
|
||||||
Assert.Equal(expectedEventId, eventData.EventId);
|
Assert.Equal(expectedEventId, eventData.EventId);
|
||||||
#if NETCOREAPP1_1
|
#if NETCOREAPP2_0
|
||||||
Assert.Equal("HostStart", eventData.EventName);
|
Assert.Equal("HostStart", eventData.EventName);
|
||||||
|
#elif NET452
|
||||||
|
#else
|
||||||
|
#error Target framework needs to be updated
|
||||||
#endif
|
#endif
|
||||||
Assert.Equal(EventLevel.Informational, eventData.Level);
|
Assert.Equal(EventLevel.Informational, eventData.Level);
|
||||||
Assert.Same(hostingEventSource, eventData.EventSource);
|
Assert.Same(hostingEventSource, eventData.EventSource);
|
||||||
|
|
@ -68,8 +71,11 @@ namespace Microsoft.AspNetCore.Hosting.Internal
|
||||||
var eventData = eventListener.EventData;
|
var eventData = eventListener.EventData;
|
||||||
Assert.NotNull(eventData);
|
Assert.NotNull(eventData);
|
||||||
Assert.Equal(expectedEventId, eventData.EventId);
|
Assert.Equal(expectedEventId, eventData.EventId);
|
||||||
#if NETCOREAPP1_1
|
#if NETCOREAPP2_0
|
||||||
Assert.Equal("HostStop", eventData.EventName);
|
Assert.Equal("HostStop", eventData.EventName);
|
||||||
|
#elif NET452
|
||||||
|
#else
|
||||||
|
#error Target framework needs to be updated
|
||||||
#endif
|
#endif
|
||||||
Assert.Equal(EventLevel.Informational, eventData.Level);
|
Assert.Equal(EventLevel.Informational, eventData.Level);
|
||||||
Assert.Same(hostingEventSource, eventData.EventSource);
|
Assert.Same(hostingEventSource, eventData.EventSource);
|
||||||
|
|
@ -126,8 +132,11 @@ namespace Microsoft.AspNetCore.Hosting.Internal
|
||||||
var eventData = eventListener.EventData;
|
var eventData = eventListener.EventData;
|
||||||
Assert.NotNull(eventData);
|
Assert.NotNull(eventData);
|
||||||
Assert.Equal(expectedEventId, eventData.EventId);
|
Assert.Equal(expectedEventId, eventData.EventId);
|
||||||
#if NETCOREAPP1_1
|
#if NETCOREAPP2_0
|
||||||
Assert.Equal("RequestStart", eventData.EventName);
|
Assert.Equal("RequestStart", eventData.EventName);
|
||||||
|
#elif NET452
|
||||||
|
#else
|
||||||
|
#error Target framework needs to be updated
|
||||||
#endif
|
#endif
|
||||||
Assert.Equal(EventLevel.Informational, eventData.Level);
|
Assert.Equal(EventLevel.Informational, eventData.Level);
|
||||||
Assert.Same(hostingEventSource, eventData.EventSource);
|
Assert.Same(hostingEventSource, eventData.EventSource);
|
||||||
|
|
@ -156,8 +165,11 @@ namespace Microsoft.AspNetCore.Hosting.Internal
|
||||||
// Assert
|
// Assert
|
||||||
var eventData = eventListener.EventData;
|
var eventData = eventListener.EventData;
|
||||||
Assert.Equal(expectedEventId, eventData.EventId);
|
Assert.Equal(expectedEventId, eventData.EventId);
|
||||||
#if NETCOREAPP1_1
|
#if NETCOREAPP2_0
|
||||||
Assert.Equal("RequestStop", eventData.EventName);
|
Assert.Equal("RequestStop", eventData.EventName);
|
||||||
|
#elif NET452
|
||||||
|
#else
|
||||||
|
#error Target framework needs to be updated
|
||||||
#endif
|
#endif
|
||||||
Assert.Equal(EventLevel.Informational, eventData.Level);
|
Assert.Equal(EventLevel.Informational, eventData.Level);
|
||||||
Assert.Same(hostingEventSource, eventData.EventSource);
|
Assert.Same(hostingEventSource, eventData.EventSource);
|
||||||
|
|
@ -180,8 +192,11 @@ namespace Microsoft.AspNetCore.Hosting.Internal
|
||||||
// Assert
|
// Assert
|
||||||
var eventData = eventListener.EventData;
|
var eventData = eventListener.EventData;
|
||||||
Assert.Equal(expectedEventId, eventData.EventId);
|
Assert.Equal(expectedEventId, eventData.EventId);
|
||||||
#if NETCOREAPP1_1
|
#if NETCOREAPP2_0
|
||||||
Assert.Equal("UnhandledException", eventData.EventName);
|
Assert.Equal("UnhandledException", eventData.EventName);
|
||||||
|
#elif NET452
|
||||||
|
#else
|
||||||
|
#error Target framework needs to be updated
|
||||||
#endif
|
#endif
|
||||||
Assert.Equal(EventLevel.Error, eventData.Level);
|
Assert.Equal(EventLevel.Error, eventData.Level);
|
||||||
Assert.Same(hostingEventSource, eventData.EventSource);
|
Assert.Same(hostingEventSource, eventData.EventSource);
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@
|
||||||
<Import Project="..\..\build\common.props" />
|
<Import Project="..\..\build\common.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netcoreapp1.1;net452</TargetFrameworks>
|
<TargetFrameworks>netcoreapp2.0;net452</TargetFrameworks>
|
||||||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp1.1</TargetFrameworks>
|
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@
|
||||||
<Import Project="..\..\build\common.props" />
|
<Import Project="..\..\build\common.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netcoreapp1.1;net452</TargetFrameworks>
|
<TargetFrameworks>netcoreapp2.0;net452</TargetFrameworks>
|
||||||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp1.1</TargetFrameworks>
|
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue