Deploying SQL CompactDB on Vista – Continued
This post is a follow up to the original post “Deploying SQL CompactDB on Vista“. The reason for this continued post is that when the time came for deploing my particular application utilizing SQL CompactDB I ran into some additional problems – which has not been covered in my first post.
The scenario in my case was that I could deploy the application on the local machine - but when I tried deploying the application on another machine running Vista, it crashed! After some digging around (had not spent too much time creating and or logging proper error messages or exceptions – let that be a lesson to me) I found the problem. The exception thrown held the following message:
"The specified store provider cannot be found in the configuration, or is not valid."
As it turned out the App.config file was missing the provider – to remedy this fact I added the following code to the App.config file:
<system.data> <DbProviderFactories> <remove invariant="System.Data.SqlServerCe.3.5"/> <add name="Microsoft SQL Server Compact Data Provider" invariant="System.Data.SqlServerCe.3.5" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=3.5.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/> </DbProviderFactories> </system.data>
The invariant value is the name of the provider which you call from the code.
With this small addition, all the problems was solved with deployment to other Vista machines…
Best Regards
/Peter
|
|








October 28th, 2010 at 13:39
[...] See this post for further deployment [...]