Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

The type initializer for 'ExtentPlaceholderCreator' threw an exception
Albatross
#1 Posted : Tuesday, November 26, 2019 12:21:11 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/20/2019(UTC)
Posts: 5
Location: United Kingdom

Thanks: 1 times
I have been using NCrunch for some time, but this morning all of my tests that access my local database are failing.

The error is:

OneTimeSetUp: System.TypeInitializationException : The type initializer for 'ExtentPlaceholderCreator' threw an exception.
----> System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation.
----> System.EntryPointNotFoundException : Unable to find an entry point named 'SetClrFeatureSwitchMap' in DLL 'SqlServerSpatial110.dll'.

This happens whenever SaveChanges is called on the local database.

Having googled the problem it appears that it could be something to do with an update to a Microsoft Package, but nothing has been updated recently on my computer.

Any help or pointers would be appreciated.
Remco
#2 Posted : Tuesday, November 26, 2019 10:38:32 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 5,869

Thanks: 763 times
Was thanked: 980 time(s) in 933 post(s)
Hi, thanks for sharing this problem.

Do you also receive this error when running your tests using anything other than NCrunch?
Albatross
#3 Posted : Wednesday, November 27, 2019 2:04:09 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/20/2019(UTC)
Posts: 5
Location: United Kingdom

Thanks: 1 times
The same error is shown when running with NUnit.

I have tried uninstalling the SQL Server 2012 updates that were installed on Monday, but that has not fixed the problem.

My guess is that an update has caused the issue as there have been no code changes since it was last running, but how do I resolve the issue?
Remco
#4 Posted : Thursday, November 28, 2019 12:20:53 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 5,869

Thanks: 763 times
Was thanked: 980 time(s) in 933 post(s)
Albatross;14146 wrote:
The same error is shown when running with NUnit.

I have tried uninstalling the SQL Server 2012 updates that were installed on Monday, but that has not fixed the problem.

My guess is that an update has caused the issue as there have been no code changes since it was last running, but how do I resolve the issue?


Sorry, I honestly have no idea about this one.

As the problem is being surfaced also outside NCrunch (in NUnit), it isn't being caused by anything inside the NCrunch runner.

I recommend googling the issue to see if others have encountered it. Maybe something is going wrong inside the platform.
Albatross
#5 Posted : Thursday, November 28, 2019 3:27:14 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/20/2019(UTC)
Posts: 5
Location: United Kingdom

Thanks: 1 times
To resolve the issue I have changed the app.config file used in the test project as follows:

from:

Code:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.SqlServer.Types" publicKeyToken="89845dcd8080cc91" />
        <bindingRedirect oldVersion="1.0.0.0-13.0.0.0" newVersion="10.0.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>


to:

Code:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.SqlServer.Types" publicKeyToken="89845dcd8080cc91" />
        <bindingRedirect oldVersion="1.0.0.0-13.0.0.0" newVersion="10.0.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.032 seconds.