I'm just trying to do a real, quick and simple RavenDb unit test in basically an empty, new project:
<PackageReference Include="RavenDB.TestDriver" Version="4.2.103" />
...
public class SetupRavenDbTests : RavenTestDriver
{
[Fact]
public void GivenTheBareMinimum_SetupRaveDb_SetsUpADatabase()
{
// Arrange.
var documentStore = GetDocumentStore();
// Act.
// Stuff here...
// Assert.
var statistics = documentStore.Maintenance.Send(new GetStatisticsOperation());
statistics.CountOfDocuments.ShouldBe(0);
statistics.Indexes.Length.ShouldBe(0);
documentStore.Dispose();
}
}
Okay - nothing hard.
When I run this test, I get this error:
System.InvalidOperationException : Unable to start the RavenDB Server
Error:
It was not possible to find any compatible framework version
- The following frameworks were found:
You can resolve the problem by installing the specified framework and/or SDK.
The specified framework can be found at:
Ok - I understand the error message and I understand the solution (i need to _also_ install an older version of
ASP.NET CORE).
So my question is -> can this be done 'better'? Like, is there any way we can rely on a nuget version instead of a pre-installed version?
It feels potentially error-prone/frustrating to have to make sure that a specific version of aspnet SDK is installed.
I think the real frustration is actually that this is a RUNTIME error. If it was a compile time ... I feel like I could handle that (mentally) a bit quicker/easier ?
I donno... what do other people think?
-me-