warrenbuckley / Umbraco-JWT-AuthTokens

This is a repository for providing a secure based API to perform backoffice actions using JWT Auth tokens
14 stars 19 forks source link

Cannot install UmbracoAuthTokens on .NETFramework 4.5 #2

Open ilijamitkov opened 8 years ago

ilijamitkov commented 8 years ago

Install failed. Rolling back... Install-Package : Could not install package 'UmbracoAuthTokens 1.1.0.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', but the package does not contain a ny assembly references or content files that are compatible with that framework. For more information, contact the package author. At line:1 char:1

warrenbuckley commented 8 years ago

@mece7 feel free to grab the source and compile against the framework version you need.

ilijamitkov commented 8 years ago

Thanks for the fast reply!, I've done so.

I've also noticed that some of the methods are deprecated so I used this on ApplicationStarted ILogger logger = LoggerResolver.Current.Logger; DatabaseContext dbContext = applicationContext.DatabaseContext; DatabaseSchemaHelper databaseSchemaHelper = new DatabaseSchemaHelper(dbContext.Database, logger, dbContext.SqlSyntax);

        if (!databaseSchemaHelper.TableExist("identityAuthTokens"))
        {
            databaseSchemaHelper.CreateTable<UmbracoAuthToken>(false);
        }
warrenbuckley commented 8 years ago

No problem, glad you got it sorted. Yes I built this a little while back now. So there may be better alternatives in the Umbraco APIs.

ilijamitkov commented 8 years ago

Sure I understand, Thanks for sharing :)

rulrok commented 7 years ago

In case someone does not want to build by themselves, you can (if possible within constraints) update your project's .NET framework target version to 4.5.1 because it is the same version used in this package.