diff --git a/sdk/AWSXRayRecorder.nuspec b/sdk/AWSXRayRecorder.nuspec index 861af27d..bdf6f3c8 100644 --- a/sdk/AWSXRayRecorder.nuspec +++ b/sdk/AWSXRayRecorder.nuspec @@ -30,6 +30,19 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/sdk/src/Core/AWSXRayRecorder.Core.csproj b/sdk/src/Core/AWSXRayRecorder.Core.csproj index 032f7bcd..49a169f8 100644 --- a/sdk/src/Core/AWSXRayRecorder.Core.csproj +++ b/sdk/src/Core/AWSXRayRecorder.Core.csproj @@ -1,7 +1,7 @@  - net45;netstandard2.0 + net45;netstandard2.0;netcoreapp3.1 Amazon.com, Inc Amazon Web Service X-Ray Recorder Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. @@ -46,7 +46,11 @@ - + + + + + @@ -54,7 +58,7 @@ - + diff --git a/sdk/src/Handlers/AspNetCore/AWSXRayRecorder.Handlers.AspNetCore.csproj b/sdk/src/Handlers/AspNetCore/AWSXRayRecorder.Handlers.AspNetCore.csproj index 817c5259..5c1bb088 100644 --- a/sdk/src/Handlers/AspNetCore/AWSXRayRecorder.Handlers.AspNetCore.csproj +++ b/sdk/src/Handlers/AspNetCore/AWSXRayRecorder.Handlers.AspNetCore.csproj @@ -1,6 +1,6 @@  - netstandard2.0 + netstandard2.0;netcoreapp3.1 Amazon.com, Inc Amazon Web Service X-Ray Recorder Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. @@ -28,11 +28,15 @@ 1701;1702;1705;1591;1587;1573;1572 - + + + + + diff --git a/sdk/test/IntegrationTests/AWSXRayRecorder.IntegrationTests.csproj b/sdk/test/IntegrationTests/AWSXRayRecorder.IntegrationTests.csproj index 58460316..62e5fdd0 100644 --- a/sdk/test/IntegrationTests/AWSXRayRecorder.IntegrationTests.csproj +++ b/sdk/test/IntegrationTests/AWSXRayRecorder.IntegrationTests.csproj @@ -2,7 +2,7 @@ - net45;netcoreapp2.0 + net45;netcoreapp2.0;netcoreapp3.1 Amazon.com, Inc Amazon Web Service X-Ray Recorder Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/sdk/test/SmokeTests/AWSXRayRecorder.SmokeTests.csproj b/sdk/test/SmokeTests/AWSXRayRecorder.SmokeTests.csproj index c1cf4749..15b0da58 100644 --- a/sdk/test/SmokeTests/AWSXRayRecorder.SmokeTests.csproj +++ b/sdk/test/SmokeTests/AWSXRayRecorder.SmokeTests.csproj @@ -1,7 +1,7 @@  - net452;netcoreapp2.0 + net452;netcoreapp2.0;netcoreapp3.1 Amazon.com, Inc Amazon Web Service X-Ray Recorder Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj b/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj index 3c0a5672..42c7300f 100644 --- a/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj +++ b/sdk/test/UnitTests/AWSXRayRecorder.UnitTests.csproj @@ -2,7 +2,7 @@ - net452;netcoreapp2.0 + net452;netcoreapp2.0;netcoreapp3.1 Amazon.com, Inc Amazon Web Service X-Ray Recorder Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. @@ -35,6 +35,15 @@ 0618;1701;1702;1705 + + TRACE;DEBUG + 0618;1701;1702;1705 + + + + 0618;1701;1702;1705 + + @@ -55,6 +64,11 @@ + + + + + @@ -77,7 +91,7 @@ - + diff --git a/sdk/test/UnitTests/JsonSegmentMarshallerTest.cs b/sdk/test/UnitTests/JsonSegmentMarshallerTest.cs index c85d30f6..ff2d8fea 100644 --- a/sdk/test/UnitTests/JsonSegmentMarshallerTest.cs +++ b/sdk/test/UnitTests/JsonSegmentMarshallerTest.cs @@ -114,7 +114,7 @@ public void TestMarshallDelegate() public object SyncFunction(object obj) => obj; public void SyncAction(object obj) { return; } - public async Task AsyncFunction(object obj) => obj; + public Task AsyncFunction(object obj) => Task.FromResult(obj); [TestMethod] public void TestMarshallSimpleSegment() @@ -190,7 +190,12 @@ public void TestMarshallAddException() var filePath = trace.GetFrame(0).GetFileName().Replace("\\", "\\\\"); var line = new StackTrace(e, true).GetFrame(0).GetFileLineNumber(); var workingDirectory = Directory.GetCurrentDirectory().Replace("\\", "\\\\"); + +#if NETCOREAPP3_1_OR_GREATER + var expected = "{\"format\":\"json\",\"version\":1}\n{\"id\":\"1111111111111111\",\"start_time\":0,\"end_time\":0,\"name\":\"test\",\"fault\":true,\"cause\":{\"working_directory\":\"" + workingDirectory + "\",\"exceptions\":[{\"id\":\"" + subsegment.Cause.ExceptionDescriptors[0].Id + "\",\"message\":\"Value cannot be null. (Parameter 'value')\",\"type\":\"ArgumentNullException\",\"remote\":false,\"stack\":[{\"path\":\"" + filePath + "\",\"line\":" + line + ",\"label\":\"Amazon.XRay.Recorder.UnitTests.JsonSegmentMarshallerTest.TestMarshallAddException\"}]}]}}"; +#else var expected = "{\"format\":\"json\",\"version\":1}\n{\"id\":\"1111111111111111\",\"start_time\":0,\"end_time\":0,\"name\":\"test\",\"fault\":true,\"cause\":{\"working_directory\":\"" + workingDirectory + "\",\"exceptions\":[{\"id\":\"" + subsegment.Cause.ExceptionDescriptors[0].Id + "\",\"message\":\"Value cannot be null." + Environment.NewLine.Replace("\r", @"\r").Replace("\n", @"\n") + "Parameter name: value\",\"type\":\"ArgumentNullException\",\"remote\":false,\"stack\":[{\"path\":\"" + filePath + "\",\"line\":" + line + ",\"label\":\"Amazon.XRay.Recorder.UnitTests.JsonSegmentMarshallerTest.TestMarshallAddException\"}]}]}}"; +#endif Assert.AreEqual(expected, actual); }