Skip to main content

Posts

Featured

The type initializer for 'Microsoft.Data.SqlClient.SNINativeMethodWrapper' threw an exception

You have just deployed a new application that you have written and it all works on your machine, but as soon as you run it you get: The type initializer for 'Microsoft.Data.SqlClient.SNINativeMethodWrapper' threw an exception Check if you have an x64 and x32 folder in your bin or the same folder as your executable (.exe).  These folders each has a SNI.dll and SNI.pdb and the folders and at least the SNI.dll should be included in your deployments. In my case, I use Octopus Deploy and more specifically OctoPack to package the applications for deployment.  To make OctoPack pick this up I had to make the following change: Add a nuspec file to the project, and  Add a file element under the files element: For a web api: <file src="bin\x64\*.*" target="bin\x64\" /> <file src="bin\x32\*.*" target="bin\x32\" /> For a console app/windows service: <file src="bin\x64\*.*" target="x64\" /> <file src="bin\x

Latest posts

How to trigger an Azure Function with a TimerTrigger during development

How to resolve: We can't install the 64-bit version of Office because we found the following 32-bit programs on your PC

Where is SQLPackage?

ASP.NET Log requests and responses

Error 2203: Database: C:\Windows\Installer\inprogressinstallinfo.ipi. Cannot open database file.

How to resolve: 'ASPNETCOMPILER: Object reference not set to an instance of an object'

Resolving TS5023:Build:Unknown compiler option

RestrictedCaptionAreaChangedEventArgs could not be resolved

Where to find Reactive Extensions 2.2.5

Check if Google Play Services are availble in Xamarin