From 218f845b67de246ba9bf287b85b6b55c7fe8d9b4 Mon Sep 17 00:00:00 2001 From: John Simons Date: Tue, 12 Aug 2014 12:17:29 +1000 Subject: [PATCH] Improved RavenDB check to ensure only v2.0 of RavenDB Server is being used. --- .../Persistence/Raven/ConfigureRavenPersistence.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/NServiceBus.Core/Persistence/Raven/ConfigureRavenPersistence.cs b/src/NServiceBus.Core/Persistence/Raven/ConfigureRavenPersistence.cs index 698f04896a2..5dd3eaab29a 100644 --- a/src/NServiceBus.Core/Persistence/Raven/ConfigureRavenPersistence.cs +++ b/src/NServiceBus.Core/Persistence/Raven/ConfigureRavenPersistence.cs @@ -299,7 +299,7 @@ static void VerifyConnectionToRavenDBServer(IDocumentStore store) return; } - if (!ravenBuildInfo.IsVersion2OrHigher()) + if (!ravenBuildInfo.IsVersion2O()) { throw new InvalidOperationException(string.Format(WrongRavenVersionMessage, ravenBuildInfo)); } @@ -331,7 +331,7 @@ static void ShowUncontactableRavenWarning(IDocumentStore store,Exception excepti static Action customisationCallback = store => { }; const string WrongRavenVersionMessage = -@"The RavenDB server you have specified is detected to be {0}. NServiceBus requires RavenDB version 2 or higher to operate correctly. Please update your RavenDB server. +@"The RavenDB server you have specified is detected to be {0}. NServiceBus requires RavenDB version 2.0 to operate correctly. Please update your RavenDB server. Further instructions can be found at:http://particular.net/articles/using-ravendb-in-nservicebus-installing"; @@ -359,9 +359,9 @@ class RavenBuildInfo public string BuildVersion { get; set; } - public bool IsVersion2OrHigher() + public bool IsVersion2O() { - return !string.IsNullOrEmpty(ProductVersion) && !ProductVersion.StartsWith("1"); + return !string.IsNullOrEmpty(ProductVersion) && ProductVersion.StartsWith("2.0"); } public override string ToString()