aspnet / UserSecrets

Command line tool and configuration provider for managing secrets
28 stars 17 forks source link

Install failure - error in project.json #15

Closed mattdwen closed 9 years ago

mattdwen commented 9 years ago

I'm attempting to install SecretManager via the following command line with dnu` v1.0.0-beta5-11566:

dnu commands install SecretManager

However the install fails, referencing an error in the SecretManager project.json:

PS C:\Projects\diva-focus> dnu commands uninstall SecretManager
SecretManager command is not installed.
PS C:\Projects\diva-focus> dnu commands install SecretManager
  CACHE https://www.nuget.org/api/v2/FindPackagesById()?Id='SecretManager'
Restoring packages for C:\Users\Matt Dwen\.dnx\bin\packages\7aa68819f2a0433d874c2922bdccf39b\project.json
Writing lock file C:\Users\Matt Dwen\.dnx\bin\packages\7aa68819f2a0433d874c2922bdccf39b\project.lock.json
Restore complete, 238ms elapsed
Restoring packages for C:\Users\Matt Dwen\.dnx\bin\packages\SecretManager\1.0.0-beta4\app\project.json
  CACHE https://www.nuget.org/api/v2/FindPackagesById()?Id='SecretManager'
  CACHE https://www.nuget.org/api/v2/FindPackagesById()?Id='System.Console'
Unable to locate SecretManager >= 1.0.0-beta4-10173
Writing lock file C:\Users\Matt Dwen\.dnx\bin\packages\SecretManager\1.0.0-beta4\app\project.lock.json
Restore complete, 149ms elapsed
Errors in C:\Users\Matt Dwen\.dnx\bin\packages\SecretManager\1.0.0-beta4\app\project.json
    Unable to locate SecretManager >= 1.0.0-beta4-10173

The package ends up inside C:\Users\Matt Dwen\.dnx\bin\packages\SecretManager\1.0.0-beta4 but attempting to execute user-secret results in a PowerShell ObjectNotFound dump.

bmancini55 commented 9 years ago

I'm seeing the same. Did you find a resolution?

davidfowl commented 9 years ago

There are some regressions with beta5

BrennanConroy commented 9 years ago

Did you install SecretManager before? Cause your uninstall is wrong, you need to do uninstall user-secret

mattdwen commented 9 years ago

I have not installed SecretManager before. Have also attempted on a clean Win10 VM.

BrennanConroy commented 9 years ago

Like David said, there is a regression, but it doesn't apply to your version of dnx probably. Also, are your nuget feeds pointing to nuget.org? Because you are getting beta4 versions. Don't cross the streams!

rajeshchawla commented 9 years ago

Understand it's a regression, any thoughts for a workaround?

BrennanConroy commented 9 years ago

Use beta4 or beta5 less than version ~11582

rajeshchawla commented 9 years ago

Not quite sure how to do that.

I'm missing how to specify the version on the dnu command install and the command Install-Package SecretManager -Pre in the powershell console doesn't seem to get the right version.

Any hints?

ThatRendle commented 9 years ago

I'm using beta4 (dnx-mono) on Ubuntu and getting the same error.

sksbrg commented 9 years ago

Hi, I experienced the same issue. Solved it by adjusting version number in project.json locally; see linked issue (https://github.com/aspnet/Home/issues/601#issuecomment-102780011).

DNX versions on my machine: aspnet__usersecrets__issue15__local_dnx_versions

With kind regards, Stefan

freecellwiz commented 9 years ago

I followed Stefan's suggestion above and this resolved the problem for me.

mattdwen commented 9 years ago

Yup, Stefan's fix worked for me as well.