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

SecretManager broken when running in vscode #2395

Closed
rspaulino opened this issue Jan 26, 2016 · 2 comments
Closed

SecretManager broken when running in vscode #2395

rspaulino opened this issue Jan 26, 2016 · 2 comments
Assignees

Comments

@rspaulino
Copy link

vscode 0.10.5

I have a project setup to use secret and if I run the project in VS15 or cmd using "dnx web" work but if I run it from VSCode Command Palette -> dnx:Run Command -> dnx web
I get the following error:

Application startup exception: System.ArgumentNullException: Value cannot be null.
Parameter name: paths
at System.IO.Path.Combine(String[] paths)
at Microsoft.Extensions.Configuration.UserSecrets.PathHelper.GetSecretsPathFromSecretsId(String userSecretsId) at Microsoft.Extensions.Configuration.ConfigurationExtensions.AddUserSecrets(IConfigurationBuilder configuration) at aspnet.Startup..ctor(IHostingEnvironment env) in c:\Users\rspaulino\Documents\vscodeprojects\aspnet\Startup.cs:line 23
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider)

at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.CreateInstance(IServiceProvider provider, Type instanceType, Object[] parameters)
at Microsoft.AspNet.Hosting.Startup.StartupLoader.LoadMethods(Type startupType, IList`1 diagnosticMessages)
at Microsoft.AspNet.Hosting.Internal.HostingEngine.EnsureStartup()
at Microsoft.AspNet.Hosting.Internal.HostingEngine.BuildApplication()

Hosting environment: Development
Now listening on: http://localhost:5000
Application started. Press Ctrl+C to shut down.

this is line 23: builder.AddUserSecrets();
I have install secretmanager, set a secret, have the proper dependency as I mention this project work and compile when run from VS or command line the issue only happen when it's run from vscode.

here is a link of the example I follow: https://docs.asp.net/en/latest/security/app-secrets.html

@rspaulino
Copy link
Author

I can confirm that the same code on Mac work but on Windows it doesn't.

@jrieken
Copy link
Member

jrieken commented Jan 27, 2016

This issue was moved to dotnet/vscode-csharp#21

@jrieken jrieken closed this as completed Jan 27, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants