3

I'm working with Visual Studio 2015 RC and following a tutorial for adding Facebook auth. It says to store the Facebook App Id as a secret using the SecretManager app:

"Set the Facebook AppId by running user-secret set Authentication:Facebook:AppId 862373430475128"

I am not quite grasping how to install the SecretManager, or how to access it from a command line. I'm used to VS2010 and so the dnvm/dnu stuff is totally new to me. Here's what I've tried:

  • opened a regular command prompt and typed dnvm - that works; it's in the PATH
  • typed user-secret - not recognized
  • tried to install SecretManager via dnvm - got an error partway through
  • added SecretManager to my project via nuGet - worked but I don't get where to go to type "user-secret"

Can someone provide a simple set of steps to get to where I can use the "user-secret" command?

UPDATE: After manually adding the dnu tool to my Path and running

dnu commands install SecretManager

I got the following command line output:

GET https://www.nuget.org/api/v2/FindPackagesById()?Id='SecretManager'.
OK https://www.nuget.org/api/v2/FindPackagesById()?Id='SecretManager' 595ms
Restoring packages for C:\Users\jprice\.dnx\bin\packages\6534b338f1b44210898ea19d5c3801b9\project.json
Writing lock file C:\Users\jprice\.dnx\bin\packages\6534b338f1b44210898ea19d5c3801b9\project.lock.json
Restore complete, 358ms elapsed
Restoring packages for C:\Users\jprice\.dnx\bin\packages\SecretManager\1.0.0-beta4\app\project.json
CACHE https://www.nuget.org/api/v2/FindPackagesById()?Id='SecretManager'
GET https://www.nuget.org/api/v2/FindPackagesById()?Id='System.Console'.
OK https://www.nuget.org/api/v2/FindPackagesById()?Id='System.Console' 407ms
Unable to locate SecretManager >= 1.0.0-beta4-10173
Writing lock file C:\Users\jprice\.dnx\bin\packages\SecretManager\1.0.0-beta4\app\project.lock.json
Restore complete, 564ms elapsed
Errors in C:\Users\jprice\.dnx\bin\packages\SecretManager\1.0.0-beta4\app\project.json
Unable to locate SecretManager >= 1.0.0-beta4-10173

I know how to install nuGet packages for a specific app, but I'm less clear on how the global tools concept works. I'm currently on VS 2010, so this is mostly new to me.

John Price
  • 191
  • 1
  • 1
  • 7
  • If it helps, I initially couldn't find dnu at all, but it seems to be at C:\Users\myusername\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta4\bin - adding that to my Windows path got me to where I could use **dnu** but if I run **dnu commands install SecretManager** I get some GET lines then **Unable to locate SecretManager >= 1.0.0-beta4-10173** – John Price May 13 '15 at 19:20
  • Can you add more details to this question? Specifically, what error did you get when you tried to install SecretManager, as well as a sample of code for which you're trying to create this secret? Otherwise your question risks being closed as Too Broad. – TylerH May 13 '15 at 20:07
  • Also, see page 177/178 https://media.readthedocs.org/pdf/aspnet/latest/aspnet.pdf to compare your process – TylerH May 13 '15 at 20:12

1 Answers1

1

See https://github.com/aspnet/Home/issues/601 . A user there had the same issue with SecretManager and his solution (editing the dependency version at C:\Users\myname.dnx\bin\packages\SecretManager\1.0.0-beta4\app) worked for me.

I'm still not 100% clear on why I had to manually set up the PATH to the dnu tool, but I'm guessing that the community edition is just missing the VS command prompt and other items.

John Price
  • 191
  • 1
  • 1
  • 7