Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install UmbracoAuthTokens on .NETFramework 4.5 #2

Open
ilijamitkov opened this issue Jan 11, 2016 · 5 comments
Open

Cannot install UmbracoAuthTokens on .NETFramework 4.5 #2

ilijamitkov opened this issue Jan 11, 2016 · 5 comments

Comments

@ilijamitkov
Copy link

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

  • Install-Package UmbracoAuthTokens
  • - CategoryInfo          : NotSpecified: (:) [Install-Package], InvalidOperationException
    - FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
    
@warrenbuckley
Copy link
Owner

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

@ilijamitkov
Copy link
Author

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
Copy link
Owner

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
Copy link
Author

Sure I understand, Thanks for sharing :)

@rulrok
Copy link

rulrok commented Mar 2, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants