Dll problem after transferring a project to another hard drive

I just changed the hard drive and operating system from XP to Win7 . Before the source code was on the D: drive , now they are on F:, in the same folder structure.

The problem is the configuration of FluentNhibernate. I get the following InvalidOperationException StackTrace:

   at FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory() in d:\Builds\FluentNH-v1.x-nh3\src\FluentNHibernate\Cfg\FluentConfiguration.cs:line 115
   at TSI_Manager.FNH_Manager.CreateSessionFactory() in F:\.....

As you can see, he is trying to access D : . I do not know exactly what is trying to access this. But, looking in my project links, all links (except System ...) are equal to F: and are set to Copy Local = True .

So, what about D :? And what steps did I miss?

Hooray!


EDIT: Exception Details:

System.InvalidOperationException was unhandled
  Message=An error occurred creating the form. See Exception.InnerException for details.  The error is: An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail.
  Source=TSI Manager
  StackTrace:
       at TSI_Manager.My.MyProject.MyForms.Create__Instance__[T](T Instance) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 190
       at TSI_Manager.My.MyProject.MyForms.get_MainForm()
       at TSI_Manager.My.MyApplication.OnCreateMainForm() in F:\My Jotta\VB\Projects VS2010\IB API Projects\9.64.16\ClientManager\v0004 Changing ActiveUser\TSI Manager\My Project\Application.Designer.vb:line 35
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
       at TSI_Manager.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: FluentNHibernate.Cfg.FluentConfigurationException
       Message=An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail.
       Source=FluentNHibernate
       StackTrace:
            at FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory() in d:\Builds\FluentNH-v1.x-nh3\src\FluentNHibernate\Cfg\FluentConfiguration.cs:line 115
            at TSI_Manager.FNH_Manager.CreateSessionFactory() in F:\My Jotta\VB\Projects VS2010\IB API Projects\9.64.16\ClientManager\v0004 Changing ActiveUser\TSI Manager\DAL\FnhManager.vb:line 43
            at TSI_Manager.FNH_Manager.ConfigureSessionFactory(String connectionStr) in F:\My Jotta\VB\Projects VS2010\IB API Projects\9.64.16\ClientManager\v0004 Changing ActiveUser\TSI Manager\DAL\FnhManager.vb:line 18
            at TSI_Manager.MainBL.InitializeDatabase() in F:\My Jotta\VB\Projects VS2010\IB API Projects\9.64.16\ClientManager\v0004 Changing ActiveUser\TSI Manager\Generic\MainBL.vb:line 174
            at TSI_Manager.MainBL..ctor() in F:\My Jotta\VB\Projects VS2010\IB API Projects\9.64.16\ClientManager\v0004 Changing ActiveUser\TSI Manager\Generic\MainBL.vb:line 92
            at TSI_Manager.MainForm..ctor() in F:\My Jotta\VB\Projects VS2010\IB API Projects\9.64.16\ClientManager\v0004 Changing ActiveUser\TSI Manager\GUI\Forms\MainForm.vb:line 6
       InnerException: NHibernate.HibernateException
            Message=Could not create the driver from NHibernate.Driver.SQLite20Driver, NHibernate, Version=3.0.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4.
            Source=NHibernate
            StackTrace:
                 at NHibernate.Connection.ConnectionProvider.ConfigureDriver(IDictionary`2 settings) in d:\CSharp\NH\nhibernate\src\NHibernate\Connection\ConnectionProvider.cs:line 116
                 at NHibernate.Connection.ConnectionProvider.Configure(IDictionary`2 settings) in d:\CSharp\NH\nhibernate\src\NHibernate\Connection\ConnectionProvider.cs:line 64
                 at NHibernate.Connection.ConnectionProviderFactory.NewConnectionProvider(IDictionary`2 settings) in d:\CSharp\NH\nhibernate\src\NHibernate\Connection\ConnectionProviderFactory.cs:line 50
                 at NHibernate.Cfg.SettingsFactory.BuildSettings(IDictionary`2 properties) in d:\CSharp\NH\nhibernate\src\NHibernate\Cfg\SettingsFactory.cs:line 83
                 at NHibernate.Cfg.Configuration.BuildSettings() in d:\CSharp\NH\nhibernate\src\NHibernate\Cfg\Configuration.cs:line 1687
                 at NHibernate.Cfg.Configuration.BuildSessionFactory() in d:\CSharp\NH\nhibernate\src\NHibernate\Cfg\Configuration.cs:line 1239
                 at FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory() in d:\Builds\FluentNH-v1.x-nh3\src\FluentNHibernate\Cfg\FluentConfiguration.cs:line 108
            InnerException: System.Reflection.TargetInvocationException
                 Message=Exception has been thrown by the target of an invocation.
                 Source=mscorlib
                 StackTrace:
                      at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
                      at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
                      at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
                      at System.Activator.CreateInstance(Type type, Boolean nonPublic)
                      at NHibernate.Bytecode.ActivatorObjectsFactory.CreateInstance(Type type) in d:\CSharp\NH\nhibernate\src\NHibernate\Bytecode\ActivatorObjectsFactory.cs:line 9
                      at NHibernate.Connection.ConnectionProvider.ConfigureDriver(IDictionary`2 settings) in d:\CSharp\NH\nhibernate\src\NHibernate\Connection\ConnectionProvider.cs:line 107
                 InnerException: System.ArgumentException
                      Message=Unable to find the requested .Net Framework Data Provider.  It may not be installed.
                      Source=System.Data
                      StackTrace:
                           at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName)
                           at NHibernate.Driver.ReflectionBasedDriver..ctor(String providerInvariantName, String driverAssemblyName, String connectionTypeName, String commandTypeName) in d:\CSharp\NH\nhibernate\src\NHibernate\Driver\ReflectionBasedDriver.cs:line 49
                           at NHibernate.Driver.SQLite20Driver..ctor() in d:\CSharp\NH\nhibernate\src\NHibernate\Driver\SQLite20Driver.cs:line 28
                      InnerException: 
+3
source share
2 answers

He's not really trying to access D: (as far as we can see) - he just thinks the source is SourceSessionFactory. You can rebuild FluentNHibernate yourself if you want to fix this, but I don't think this is the source of the problem.

Take a look at the exception message - this will most likely give more information.

+1
source

I think the key issue is an InnerException with the message:

Could not find the requested .Net Framework data provider. It cannot be installed.

It looks like you need to install the appropriate data provider in the GAC on your new computer or make sure that it is correctly listed in your project.

, SQLite :

http://sqlite.phxsoftware.com/

0

All Articles