From 8a68ce56d592fba30930002a44ef4a2211475928 Mon Sep 17 00:00:00 2001 From: Lucas Zimerman Fraulob Date: Sat, 6 Feb 2021 11:16:06 -0300 Subject: [PATCH 1/2] Bump Sentry SDK version to 3.0 --- .../Sentry.Samples.AspNet.Mvc/Global.asax.cs | 2 +- .../Sentry.Samples.AspNet.Mvc.csproj | 42 ++++++++++++++----- samples/Sentry.Samples.AspNet.Mvc/Web.config | 4 ++ .../Sentry.Samples.AspNet.Mvc/packages.config | 15 +++++-- src/Sentry.EntityFramework/IQueryLogger.cs | 2 - .../Sentry.EntityFramework.csproj | 4 +- .../SentryCommandInterceptor.cs | 1 - .../SentryQueryLogger.cs | 1 - .../DsnSamples.cs | 2 +- .../ErrorProcessorTests.cs | 5 --- .../SentryCommandInterceptorTests.cs | 1 - .../SentryQueryLoggerTests.cs | 1 - 12 files changed, 51 insertions(+), 29 deletions(-) diff --git a/samples/Sentry.Samples.AspNet.Mvc/Global.asax.cs b/samples/Sentry.Samples.AspNet.Mvc/Global.asax.cs index f768d7f..6f88485 100644 --- a/samples/Sentry.Samples.AspNet.Mvc/Global.asax.cs +++ b/samples/Sentry.Samples.AspNet.Mvc/Global.asax.cs @@ -25,7 +25,7 @@ protected void Application_Start() _sentrySdk = SentrySdk.Init(o => { // We store the DSN inside Web.config; make sure to use your own DSN! - o.Dsn = new Dsn(ConfigurationManager.AppSettings["SentryDsn"]); + o.Dsn = ConfigurationManager.AppSettings["SentryDsn"]; // Add the EntityFramework integration o.AddEntityFramework(); diff --git a/samples/Sentry.Samples.AspNet.Mvc/Sentry.Samples.AspNet.Mvc.csproj b/samples/Sentry.Samples.AspNet.Mvc/Sentry.Samples.AspNet.Mvc.csproj index 9ae61d3..2b90790 100644 --- a/samples/Sentry.Samples.AspNet.Mvc/Sentry.Samples.AspNet.Mvc.csproj +++ b/samples/Sentry.Samples.AspNet.Mvc/Sentry.Samples.AspNet.Mvc.csproj @@ -46,30 +46,52 @@ 4 + + ..\..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll + ..\..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll - - ..\..\packages\Sentry.2.1.6\lib\net461\Sentry.dll - - - ..\..\packages\Sentry.PlatformAbstractions.1.1.1\lib\net45\Sentry.PlatformAbstractions.dll - - - ..\..\packages\Sentry.Protocol.2.1.6\lib\net46\Sentry.Protocol.dll + + ..\..\packages\Sentry.3.0.3\lib\net461\Sentry.dll - - ..\..\packages\System.Collections.Immutable.1.5.0\lib\netstandard2.0\System.Collections.Immutable.dll + + ..\..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + + ..\..\packages\System.Collections.Immutable.5.0.0\lib\net461\System.Collections.Immutable.dll + + ..\..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll + + + + ..\..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + + ..\..\packages\System.Reflection.Metadata.5.0.0\lib\net461\System.Reflection.Metadata.dll + + + ..\..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll + ..\..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll True True + + ..\..\packages\System.Text.Encodings.Web.5.0.0\lib\net461\System.Text.Encodings.Web.dll + + + ..\..\packages\System.Text.Json.5.0.0\lib\net461\System.Text.Json.dll + + + ..\..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll + ..\..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll diff --git a/samples/Sentry.Samples.AspNet.Mvc/Web.config b/samples/Sentry.Samples.AspNet.Mvc/Web.config index a1e9eda..009ffe8 100644 --- a/samples/Sentry.Samples.AspNet.Mvc/Web.config +++ b/samples/Sentry.Samples.AspNet.Mvc/Web.config @@ -93,6 +93,10 @@ + + + + diff --git a/samples/Sentry.Samples.AspNet.Mvc/packages.config b/samples/Sentry.Samples.AspNet.Mvc/packages.config index 0a01a1a..f6c7b2d 100644 --- a/samples/Sentry.Samples.AspNet.Mvc/packages.config +++ b/samples/Sentry.Samples.AspNet.Mvc/packages.config @@ -13,6 +13,7 @@ + @@ -29,12 +30,18 @@ - - - - + + + + + + + + + + \ No newline at end of file diff --git a/src/Sentry.EntityFramework/IQueryLogger.cs b/src/Sentry.EntityFramework/IQueryLogger.cs index ab57a1c..88b445c 100644 --- a/src/Sentry.EntityFramework/IQueryLogger.cs +++ b/src/Sentry.EntityFramework/IQueryLogger.cs @@ -1,5 +1,3 @@ -using Sentry.Protocol; - namespace Sentry.EntityFramework { public interface IQueryLogger diff --git a/src/Sentry.EntityFramework/Sentry.EntityFramework.csproj b/src/Sentry.EntityFramework/Sentry.EntityFramework.csproj index 4285d56..a50ffe2 100644 --- a/src/Sentry.EntityFramework/Sentry.EntityFramework.csproj +++ b/src/Sentry.EntityFramework/Sentry.EntityFramework.csproj @@ -29,11 +29,11 @@ - + - + diff --git a/src/Sentry.EntityFramework/SentryCommandInterceptor.cs b/src/Sentry.EntityFramework/SentryCommandInterceptor.cs index 9482a7f..4f798f3 100644 --- a/src/Sentry.EntityFramework/SentryCommandInterceptor.cs +++ b/src/Sentry.EntityFramework/SentryCommandInterceptor.cs @@ -1,6 +1,5 @@ using System.Data.Common; using System.Data.Entity.Infrastructure.Interception; -using Sentry.Protocol; namespace Sentry.EntityFramework { diff --git a/src/Sentry.EntityFramework/SentryQueryLogger.cs b/src/Sentry.EntityFramework/SentryQueryLogger.cs index 45f0d0c..32d959a 100644 --- a/src/Sentry.EntityFramework/SentryQueryLogger.cs +++ b/src/Sentry.EntityFramework/SentryQueryLogger.cs @@ -1,5 +1,4 @@ using Sentry.Extensibility; -using Sentry.Protocol; namespace Sentry.EntityFramework { diff --git a/test/Sentry.EntityFramework.Tests/DsnSamples.cs b/test/Sentry.EntityFramework.Tests/DsnSamples.cs index b75f645..d54f212 100644 --- a/test/Sentry.EntityFramework.Tests/DsnSamples.cs +++ b/test/Sentry.EntityFramework.Tests/DsnSamples.cs @@ -19,6 +19,6 @@ public static class DsnSamples /// /// Valid DSN instance /// - public static Dsn Valid = new Dsn(ValidDsnWithSecret); + public static string Valid => ValidDsnWithSecret; } } diff --git a/test/Sentry.EntityFramework.Tests/ErrorProcessorTests.cs b/test/Sentry.EntityFramework.Tests/ErrorProcessorTests.cs index d55ba3d..83834a2 100644 --- a/test/Sentry.EntityFramework.Tests/ErrorProcessorTests.cs +++ b/test/Sentry.EntityFramework.Tests/ErrorProcessorTests.cs @@ -4,13 +4,8 @@ using System.Data.Common; using System.Data.Entity.Validation; using System.Linq; -using System.Text; -using System.Threading; using System.Threading.Tasks; -using NSubstitute; using Sentry.EntityFramework.ErrorProcessors; -using Sentry.Extensibility; -using Sentry.Protocol; using Xunit; namespace Sentry.EntityFramework.Tests diff --git a/test/Sentry.EntityFramework.Tests/SentryCommandInterceptorTests.cs b/test/Sentry.EntityFramework.Tests/SentryCommandInterceptorTests.cs index bae2da0..ee6d603 100644 --- a/test/Sentry.EntityFramework.Tests/SentryCommandInterceptorTests.cs +++ b/test/Sentry.EntityFramework.Tests/SentryCommandInterceptorTests.cs @@ -4,7 +4,6 @@ using System.Linq; using Effort.Provider; using NSubstitute; -using Sentry.Protocol; using Xunit; namespace Sentry.EntityFramework.Tests diff --git a/test/Sentry.EntityFramework.Tests/SentryQueryLoggerTests.cs b/test/Sentry.EntityFramework.Tests/SentryQueryLoggerTests.cs index affb973..9cc0670 100644 --- a/test/Sentry.EntityFramework.Tests/SentryQueryLoggerTests.cs +++ b/test/Sentry.EntityFramework.Tests/SentryQueryLoggerTests.cs @@ -1,6 +1,5 @@ using System.Linq; using NSubstitute; -using Sentry.Protocol; using Xunit; namespace Sentry.EntityFramework.Tests From af230e2b64490a5c6fc8a0f6a7e88f6677806c42 Mon Sep 17 00:00:00 2001 From: Lucas Zimerman Fraulob Date: Sat, 6 Feb 2021 11:57:38 -0300 Subject: [PATCH 2/2] Fix test issues. --- build.ps1 | 2 +- samples/Sentry.Samples.AspNet.Mvc/Web.config | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.ps1 b/build.ps1 index 6b58ed7..c1b27b9 100644 --- a/build.ps1 +++ b/build.ps1 @@ -64,5 +64,5 @@ if ($lastexitcode -ne 0) { Write-Error "Build failed!" } if ($lastexitcode -ne 0) { Write-Error "Pack failed!" } Set-Variable -name runner -value (GetTestRunner) -& $runner "test\Sentry.EntityFramework.Tests\bin\Release\net462\Sentry.EntityFramework.Tests.dll" +& $runner "test\Sentry.EntityFramework.Tests\bin\Release\net461\Sentry.EntityFramework.Tests.dll" if ($lastexitcode -ne 0) { Set-Variable -name fail -value true } diff --git a/samples/Sentry.Samples.AspNet.Mvc/Web.config b/samples/Sentry.Samples.AspNet.Mvc/Web.config index 009ffe8..bf74d1a 100644 --- a/samples/Sentry.Samples.AspNet.Mvc/Web.config +++ b/samples/Sentry.Samples.AspNet.Mvc/Web.config @@ -17,7 +17,7 @@ - +