I have my app that needs SQL Server CE 4.0 (using Entity Framework) and net framework 4. I put into requirements net framework 4 and SQL Server CE 4.0 (for this last one I have to make a special requirement because it is not in the default list).
The problem is when I have a Windows XP clean, and I run my app setup. First It detects that I don't have installed SQL Server CE 4.0, I agreed and my app install SQL Server CE. After this installation, the setup detect that I don't have .NET Framework 4 and the same again. It also install .NET Framework 4. Both of binaries are from my setup (no internet connection).
So, the setup then install the app. When I try to use the app, an error occurs:
Type : System.ArgumentException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : The specified store provider cannot be found in the configuration, or is not valid.
Source : System.Data.Entity
Data : System.Collections.ListDictionaryInternal
TargetSite : System.Data.Common.DbProviderFactory GetFactory(System.String)
Stack Trace :
at System.Data.EntityClient.EntityConnection.GetFactory(String providerString)
at System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString)
at System.Data.EntityClient.EntityConnection..ctor(String connectionString)
at System.Data.Objects.ObjectContext.CreateEntityConnection(String connectionString)
at System.Data.Objects.ObjectContext..ctor(String connectionString, String defaultContainerName)
at DAL.DataModel.SpecaModelContainer..ctor() in D:\Desarrollos\CNE\SPECA\DAL\DataModel\Model.Context.cs:line 24
at DAL.Repository.SpecaContext.getContext() in D:\Desarrollos\CNE\SPECA\DAL\Repository\SpecaContext.cs:line 17
at DAL.Repository.BaseRepository`1.get_contexto() in D:\Desarrollos\CNE\SPECA\DAL\Repository\BaseRepository.cs:line 18
at DAL.Services.DistritoRepository.obtenerUniverso() in D:\Desarrollos\CNE\SPECA\DAL\Repository\DistritoRepository.cs:line 18
Ok. Then I install again the Win XP and I install my app with out requirements. Then I install .NET Framework 4 and then SQL Server CE 4.0. And when I run the app, NO ERROR appears. It works fine.
So, if I install SQL Server CE 4.0 before .NET Framework 4 I have the problem, but not the other way.
Anyone knows why? Where can I tell my app install project to change the order of requirements?
Thanks