Mix postgres seems to be broken

Started a brand new project with x web AppName.

Then added OrmLite support with mix postgres.

Tried running the project and getting the following error:

System.TypeLoadException: ‘Could not load type ‘ServiceStack.DataAnnotations.PersistedAttribute’ from assembly ‘ServiceStack.Interfaces, Version=, Culture=neutral, PublicKeyToken=null’.’


 public void Configure(IAppHost appHost)
        appHost.GetPlugin<SharpPagesFeature>()?.ScriptMethods.Add(new DbScriptsAsync());

        using (var db = appHost.Resolve<IDbConnectionFactory>().Open())
            if (db.CreateTableIfNotExists<User>())

Whenever you get Type or Method Not Found or Load Exceptions when using the pre-release packages on MyGet you’ll need to clear your MyGet packages before downloading the latest v5.8.1 releases, e.g:

$ nuget locals all -clear

To ensure a clean solution also delete your /bin and /obj folders to remove the older .dll’s.

That did the trick, thanks!

1 Like