aspnet/dnx

Error when executing user-secret : System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Extensions.Logging

palves78 opened this issue · 2 comments

After creating a new VS asp.net 5 web application and following asp.net docs instructions to configure email confirmation using SendGrid, i get an error when trying to execute user-secret h

`user-secret : System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Extensions.Logging, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its dependencies. The system cannot find the file specified.
At line:1 char:1

  • user-secret
  • - CategoryInfo          : NotSpecified: (System.IO.FileN...file specified.:String) [], RemoteException
    - FullyQualifiedErrorId : NativeCommandError
    
    

File name: 'Microsoft
.Extensions.Logging, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'
at Microsoft.Extensions.SecretManager.Program..ctor(IRuntimeEnvironment runtimeEnv)

=== Pre-bind state information ===
LOG: DisplayName = Microsoft.Extensions.Logging, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
(Fully-specified)
LOG: Appbase = file:///C:/Users/Pedro/.dnx/runtimes/dnx-clr-win-x86.1.0.0-rc1-update2/bin/
LOG: Initial PrivatePath = NULL

Calling assembly : (Unknown).

LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Microsoft.Extensions.Logging, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
LOG: Fusion is hosted. Check host about this assembly.
LOG: Try host assembly store with assembly microsoft.extensions.logging, version=1.0.0.0, culture=neutral, publickeytoken=adb9793829ddae60, processorarchitecture=x86.
LOG: Try host assembly store with assembly microsoft.extensions.logging, version=1.0.0.0, culture=neutral, publickeytoken=adb9793829ddae60, processorarchitecture=msil.
LOG: Try host assembly store with assembly microsoft.extensions.logging, version=1.0.0.0, culture=neutral, publickeytoken=adb9793829ddae60.
WRN: Host assembly store does not contain this assembly.
LOG: Attempting download of new URL file:///C:/Users/Pedro/.dnx/runtimes/dnx-clr-win-x86.1.0.0-rc1-update2/bin/Microsoft.Extensions.Logging.DLL.
LOG: Attempting download of new URL file:///C:/Users/Pedro/.dnx/runtimes/dnx-clr-win-x86.1.0.0-rc1-update2/bin/Microsoft.Extensions.Logging/Microsoft.Extensions.Logging.DLL.
LOG: Attempting download of new URL file:///C:/Users/Pedro/.dnx/runtimes/dnx-clr-win-x86.1.0.0-rc1-update2/bin/Microsoft.Extensions.Logging.EXE.
LOG: Attempting download of new URL file:///C:/Users/Pedro/.dnx/runtimes/dnx-clr-win-x86.1.0.0-rc1-update2/bin/Microsoft.Extensions.Logging/Microsoft.Extensions.Logging.EXE.`

I installed user-secret running in PackageConsole:

dnu commands install Microsoft.Extensions.SecretManager

I'm using 1.0.0-rc1-update2 clr x86 win as default

Any thoughts?

Does your app work fine otherwise (i.e. do you get the error only when you run user-secret tool)?

Hi,

Well, in my pc at home it works, but in another pc at work it doesn't, when I try to register in the web app, I get an error caused by SendGrid because user-secrets isn't found. I'm unable to use user-secrets.