Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for MongoDB.Driver version 3 #2324

Merged
merged 2 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions AspNetCore.Diagnostics.HealthChecks.sln
Original file line number Diff line number Diff line change
Expand Up @@ -317,14 +317,6 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7ECFCB71-4627-4671-9222-2C91EB8FB882}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7ECFCB71-4627-4671-9222-2C91EB8FB882}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7ECFCB71-4627-4671-9222-2C91EB8FB882}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7ECFCB71-4627-4671-9222-2C91EB8FB882}.Release|Any CPU.Build.0 = Release|Any CPU
{D8C3C460-7814-43C9-943D-3D79E1BC1C3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D8C3C460-7814-43C9-943D-3D79E1BC1C3C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D8C3C460-7814-43C9-943D-3D79E1BC1C3C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D8C3C460-7814-43C9-943D-3D79E1BC1C3C}.Release|Any CPU.Build.0 = Release|Any CPU
{ED6D5756-ABEB-4EC6-9A09-F1B1EA398F97}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ED6D5756-ABEB-4EC6-9A09-F1B1EA398F97}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ED6D5756-ABEB-4EC6-9A09-F1B1EA398F97}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -861,6 +853,14 @@ Global
{3B812989-2C4E-4FCE-B3A0-EF9C00A9B3A5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3B812989-2C4E-4FCE-B3A0-EF9C00A9B3A5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3B812989-2C4E-4FCE-B3A0-EF9C00A9B3A5}.Release|Any CPU.Build.0 = Release|Any CPU
{D8C3C460-7814-43C9-943D-3D79E1BC1C3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D8C3C460-7814-43C9-943D-3D79E1BC1C3C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D8C3C460-7814-43C9-943D-3D79E1BC1C3C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D8C3C460-7814-43C9-943D-3D79E1BC1C3C}.Release|Any CPU.Build.0 = Release|Any CPU
{7ECFCB71-4627-4671-9222-2C91EB8FB882}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7ECFCB71-4627-4671-9222-2C91EB8FB882}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7ECFCB71-4627-4671-9222-2C91EB8FB882}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7ECFCB71-4627-4671-9222-2C91EB8FB882}.Release|Any CPU.Build.0 = Release|Any CPU
{17913EAF-3B12-495B-80EA-9EB975FBE6BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{17913EAF-3B12-495B-80EA-9EB975FBE6BA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{17913EAF-3B12-495B-80EA-9EB975FBE6BA}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -874,8 +874,6 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{7ECFCB71-4627-4671-9222-2C91EB8FB882} = {FF4414C2-8863-4ADA-8A1D-4B9F25C361FE}
{D8C3C460-7814-43C9-943D-3D79E1BC1C3C} = {2A3FD988-2BB8-43CF-B3A2-B70E648259D4}
{ED6D5756-ABEB-4EC6-9A09-F1B1EA398F97} = {2A3FD988-2BB8-43CF-B3A2-B70E648259D4}
{6C9B61AA-BCFC-4230-9407-12B23E522580} = {2A3FD988-2BB8-43CF-B3A2-B70E648259D4}
{65E0BF0F-B3B6-4DFD-A3E3-F91FE02DA7D3} = {2A3FD988-2BB8-43CF-B3A2-B70E648259D4}
Expand Down Expand Up @@ -1010,6 +1008,8 @@ Global
{2C02BEDF-FFFA-4747-920A-A1ED6CFFC21A} = {FF4414C2-8863-4ADA-8A1D-4B9F25C361FE}
{09160C0F-BB5E-4DF2-AF44-E859E8EDE6BD} = {FF4414C2-8863-4ADA-8A1D-4B9F25C361FE}
{3B812989-2C4E-4FCE-B3A0-EF9C00A9B3A5} = {FF4414C2-8863-4ADA-8A1D-4B9F25C361FE}
{D8C3C460-7814-43C9-943D-3D79E1BC1C3C} = {2A3FD988-2BB8-43CF-B3A2-B70E648259D4}
{7ECFCB71-4627-4671-9222-2C91EB8FB882} = {FF4414C2-8863-4ADA-8A1D-4B9F25C361FE}
{17913EAF-3B12-495B-80EA-9EB975FBE6BA} = {2A3FD988-2BB8-43CF-B3A2-B70E648259D4}
{D49CF52C-9D21-4D98-8A15-A2B259E9C003} = {FF4414C2-8863-4ADA-8A1D-4B9F25C361FE}
EndGlobalSection
Expand Down
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<PackageVersion Include="Microsoft.Extensions.Http.Polly" Version="8.0.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageVersion Include="Milvus.Client" Version="2.3.0-preview.1" />
<PackageVersion Include="MongoDB.Driver" Version="2.28.0" />
<PackageVersion Include="MongoDB.Driver" Version="3.0.0" />
<PackageVersion Include="MySqlConnector" Version="2.3.1" />
<PackageVersion Include="MySqlConnector.DependencyInjection" Version="2.3.1" />
<PackageVersion Include="NATS.Client" Version="1.1.1" />
Expand Down
2 changes: 1 addition & 1 deletion src/CallerArgumentExpressionAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public CallerArgumentExpressionAttribute(string parameterName)

#endif

#if NETSTANDARD2_0
#if NETSTANDARD2_0 || NETFRAMEWORK
eerhardt marked this conversation as resolved.
Show resolved Hide resolved

namespace System.Diagnostics.CodeAnalysis
{
Expand Down
3 changes: 2 additions & 1 deletion src/HealthChecks.MongoDb/HealthChecks.MongoDb.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>$(DefaultLibraryTargetFrameworks)</TargetFrameworks>
<!-- Match the TFMs of MongoDB.Driver -->
<TargetFrameworks>$(DefaultNetCoreApp);netstandard2.1;net472</TargetFrameworks>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we should simply drop the NS support?

Suggested change
<TargetFrameworks>$(DefaultNetCoreApp);netstandard2.1;net472</TargetFrameworks>
<TargetFrameworks>$(DefaultNetCoreApp);net472</TargetFrameworks>

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the underlying MongoDB.Driver library supports netstandard2.1, I feel like the health check library should as well. It would be a pity to block someone for no reason.

For example, I think Unity supports netstandard2.1 - https://docs.unity3d.com/6000.0/Documentation/Manual/dotnet-profile-support.html

<PackageTags>$(PackageTags);MongoDb</PackageTags>
<Description>HealthChecks.MongoDb is the health check package for MongoDb.</Description>
<VersionPrefix>$(HealthCheckMongoDB)</VersionPrefix>
Expand Down
Loading