Underlying provider failed to open

Aug 20, 2012 at 12:41 AM

I have used 1.2 version dlls in a c# project. When I try to distribute the app I get "Underlying provider failed to open" when using netcdf or csv export. I registered netcdf4 manually in code with "DataSetFactory.RegisterAssembly(Assembly.Load ("Microsoft.Research.Science.Data.NetCDF4...". No luck. I used Microsoft click-once in VS and Tarma installer to distribute the app. I get the same error. In Tarma I have used "Use DllRegister Server"will all Microsoft.Research... dlls. They are definitely in the GAC. I have installed SDS 1.2.6754 and 1.3 on these machine subsequently and still get "Underlying provider failed to open". Sometimes the install of these fails with error message that Visual c++ redistibutable is not installed - but it is.

After several weeks of failed attempts (200+) on 7 machines I can say that I cannot find a way to dependably install and register Microsoft.Research.* dlls. The only way it did work was to do a complete install of Visual Studio on the target machines.

Coordinator
Aug 21, 2012 at 10:17 PM

Your problem is most likely related to netcdf4.dll which in turn dependens on VC++ runtime dlls. While Microsoft.Research.Data...dll are ordinary managed libraries the Netcdf4.dll is a native library which is platform specific. This complicates redistribution significantly. SDS setup properly installs both versions in GAC so they can be used from both 32-bit and 64-bit applications. When you create setup for your own application you should design the multiplatform setup yourself. At a minimum, the netcdf4.dll for proper platform shall be placed at your application root or in your path.  Netcdf4.dll can be found by searching recursively windows GAC directories from command prompt.

Aug 22, 2012 at 3:18 AM
Hi vassilyl

Thank you for your reply. What you write makes sense and helps me understand the problem more. I found the original problem. I put netcdf in a separate .net 3.5 vs project and included the generated dll in my main .net 4.0 project. I did this because the website states that it does not run under 4.0. When i moved all code into my main project i found that it works just fine and the provider is registered.

Cheers
Chris

On 22/08/2012, at 8:17 AM, "vassilyl" <notifications@codeplex.com<mailto:notifications@codeplex.com>> wrote:


From: vassilyl

Your problem is most likely related to netcdf4.dll which in turn dependens on VC++ runtime dlls. While Microsoft.Research.Data...dll are ordinary managed libraries the Netcdf4.dll is a native library which is platform specific. This complicates redistribution significantly. SDS setup properly installs both versions in GAC so they can be used from both 32-bit and 64-bit applications. When you create setup for your own application you should design the multiplatform setup yourself. At a minimum, the netcdf4.dll for proper platform shall be placed at your application root or in your path. Netcdf4.dll can be found by searching recursively windows GAC directories from command prompt.

Read the full discussion online<http://sds.codeplex.com/discussions/392268#post902185>.

To add a post to this discussion, reply to this email ([email removed]<mailto:[email removed]?subject=[sds:392268]>)

To start a new discussion for this project, email [email removed]<mailto:[email removed]>

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings<https://sds.codeplex.com/subscriptions/thread/project/edit> on codePlex.com<http://codePlex.com>.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com<http://codeplex.com>