RH Wrapper Console Error

41 views
Skip to first unread message

Mike Flair

unread,
Mar 12, 2015, 12:10:37 PM3/12/15
to chucknorri...@googlegroups.com
Hi,
 
I'm just starting out with RoundHouse and would like to build a wrapper console application using the RoundHouse library. I have the following class that will load some basic config and try and run the migrator.  The error I am receiving is in the roundhouse.infrastructure.loaders.DefaultInstanceCreator > create_object_from_string_type
 
A type could not be created from the object you passed. "roundhouse.databases.sqlserver.SqlServerDatabase, roundhouse.databases.sqlserver" resolves to null.
 
Is there missing configuration below that I would need to add to correct this exception?
 
using roundhouse;

 

using roundhouse.infrastructure.app;

using roundhouse.infrastructure.logging.custom;

namespace RH.ScriptRunner

{

 
public static class Migrator

 
{

 
public static void MigrateToNewestVersion(string connectionString, string migratePath)

 
{

 
if (string.IsNullOrEmpty(migratePath))

 migratePath
= AppDomain.CurrentDomain.BaseDirectory;

 
Migrate migrator = new Migrate().Set(c =>

 
{

 c
.Logger = new ConsoleLogger();

 
//c.ConnectionString = connectionString;

 c
.SqlFilesDirectory = migratePath;

 c
.ServerName = "STLW7ASMDENTON1\\SQLEXPRESS";

 c
.DatabaseName = "TestRoundhousE";

 
// c.Baseline = true; // initial migration db structure - create

 c
.Restore = false;

 c
.Silent = true;

 c
.WithTransaction = true;

 
});

 
var configuration = migrator.GetConfiguration();

 
ApplicationConfiguraton.set_defaults_if_properties_are_not_set(configuration);

 migrator
.Run();

 
}

 
}


Dru Sellers

unread,
Mar 12, 2015, 12:40:11 PM3/12/15
to chucknorri...@googlegroups.com
quick question: you know there is a rh.exe right?

take a dotPeek look at the roundhouse dll your are referencing, is it the ILMerged one? on non-IL merged?

-d

--
You received this message because you are subscribed to the Google Groups "chucknorris" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chucknorrisframe...@googlegroups.com.
To post to this group, send email to chucknorri...@googlegroups.com.
Visit this group at http://groups.google.com/group/chucknorrisframework.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages