Command-line execution problem

Issue #248 resolved
Wanderer created an issue

I have manually placed (not installed, i'm using the portable RC version) RC 4.1.1 in its current folder. I tried executing rc.exe with certain parameters from RCDBManager. Before that, i had to change the current dir to romcenter's dir because rc.exe complained it could not find Rc_nlog.config. So after that, the result was the following error:

    RomCenter.Global.BaseLog/Error : Unable to determine the DbProviderFactory type for connection of type 'FirebirdSql.Data.FirebirdClient.FbConnection'. Make sure that the ADO.NET provider is installed or registered in the application config.

    Unhandled Exception: System.NotSupportedException: Unable to determine the DbProviderFactory type for connection of type 'FirebirdSql.Data.FirebirdClient.FbConnection'. Make sure that the ADO.NET provider is installed or registered in the application config.
         at System.Data.Entity.Infrastructure.Net40DefaultDbProviderFactoryResolver.<>c__DisplayClass5_0.<GetProviderFactory>b__0(Type t)
         at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
         at System.Data.Entity.Infrastructure.Net40DefaultDbProviderFactoryResolver.GetProviderFactory(DbConnection connection, IEnumerable`1 dataRows)
         at System.Data.Entity.Infrastructure.Net40DefaultDbProviderFactoryResolver.ResolveProviderFactory(DbConnection connection)
         at System.Data.Entity.Utilities.DbConnectionExtensions.GetProviderFactory(DbConnection connection)
         at System.Data.Entity.Core.Common.DbProviderServices.GetProviderFactory(DbConnection connection)
         at System.Data.Entity.Utilities.DbConnectionExtensions.GetProviderInvariantName(DbConnection connection)
         at System.Data.Entity.Internal.InternalConnection.get_ProviderName()
         at System.Data.Entity.Internal.LazyInternalConnection.get_ProviderName()
         at System.Data.Entity.Internal.LazyInternalContext.get_ProviderName()
         at System.Data.Entity.Internal.DefaultModelCacheKeyFactory.Create(DbContext context)
         at System.Data.Entity.Internal.LazyInternalContext.InitializeContext()
         at System.Data.Entity.Internal.InternalContext.Initialize()
         at System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType)
         at System.Data.Entity.Internal.Linq.InternalSet`1.Initialize()
         at System.Data.Entity.Internal.Linq.InternalSet`1.GetEnumerator()
         at System.Data.Entity.Infrastructure.DbQuery`1.System.Collections.Generic.IEnumerable<TResult>.GetEnumerator()
         at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
         at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
         at RomCenter.DataAccess.Firebird.EF5.Ef.GetCurrentConfig(IRdtConfig config)
         at RomCenter.DataAccess.Firebird.EF5.Ef..ctor(String fileName, IProgressTracking progressPack, IPauseAndCancellationToken pauseAndCancellationToken, Boolean validatedb)
         at RomCenter.DataAccess.Dal..ctor(IConfiguration config)
         at CommandLine.romcenter.CreateRomcenterEnv()
         at CommandLine.Program.RunCreateAndReturnExitCode(CreateOptions createOptions)
         at CommandLine.Program.<>c.<Main>b__11_1(CreateOptions options)
         at CommandLine.ParserResultExtensions.WithParsed[T](ParserResult`1 result, Action`1 action)
         at CommandLine.Program.Main(String[] args)

Command i used:

rc create -d "C:\Apps\RCDBManager\RCDBManager\TOSECDats\DATs\TOSEC - DAT Pack - Complete (3036) (TOSEC-v2020-07-29)\TOSEC\Amstrad CPC - Applications - [BIN] (TOSEC-v2014-10-28_CM).dat" -o "C:\RomCenter\datas\Amstrad CPC - Applications - [BIN] (TOSEC-v2014-10-28_CM).rdt"

(paths shortened)

Comments (6)

  1. Wanderer reporter

    OK, i think i have solved the problem. I compared the contents of rc.exe.config and RomCenter.exe.config, and i noticed the following part missing from rc.exe.config:

    Code: Select all

      <system.data>
        <DbProviderFactories>
          <remove invariant="FirebirdSql.Data.FirebirdClient" />
          <add name="FirebirdClient Data Provider" invariant="FirebirdSql.Data.FirebirdClient" description=".NET Framework Data Provider for Firebird" type="FirebirdSql.Data.FirebirdClient.FirebirdClientFactory, FirebirdSql.Data.FirebirdClient" />
        </DbProviderFactories>
      </system.data>
    

    I added it and that solved the problem.

  2. Log in to comment