I have this code:
var v = new List<string>();
using (OleDbDataReader dataReader = OleDbEnumerator.GetRootEnumerator())
{
while (dataReader.Read())
{
v.Add(string.Format("{0} - {1}", dataReader[0], dataReader[2]));
}
}
var s = v.OrderBy(x => x).ToList();
When running in debug in visual studio I get this:
when running in ncrunch I get this:
(I'm missing the Microsoft.ACE.OLEDB.12.0)
Can anyone explain why the list of providers are different in visual studio debug and in ncrunch?
It turns that it was, as suggested, related to 32bit vs 64bit builds.
The .csproj for the production code used
<PlatformTarget>AnyCPU</PlatformTarget>
while the .csproj for the unit test used
<PlatformTarget>x86</PlatformTarget>