John Price
John Price

Reputation: 311

Creating a .NET secret using SecretManager

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:

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.

Upvotes: 3

Views: 848

Answers (1)

John Price
John Price

Reputation: 311

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.

Upvotes: 2

Related Questions