Errro Debug Test NUnit VS 2022 Error while initializing logger: logger://Microsoft/TestPlatform/HtmlLogger/v1, Exception details: The referenced account is currently locked out and may not be logged on to.

Rios, Luis Antonio 1 Reputation point
2022-06-15T23:11:15.057+00:00

Error:

at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.TestLoggerManager.InitializeLogger(Object logger, String extensionUri, Dictionary`2 parameters)
Microsoft.VisualStudio.TestPlatform.Common.Exceptions.InvalidLoggerException: Error while initializing logger: logger://Microsoft/TestPlatform/HtmlLogger/v1, Exception details: The referenced account is currently locked out and may not be logged on to.

The code of Microsoft.TestPlatform.CrossPlatEngine.dll

 private bool InitializeLogger(  
      object logger,  
      string extensionUri,  
      Dictionary<string, string> parameters)  
    {  
      if (logger == null)  
        return false;  
      try  
      {  
        if (!(logger is ITestLoggerWithParameters))  
        {  
          if (logger is ITestLogger)  
          {  
            ((ITestLogger) logger).Initialize((TestLoggerEvents) this._loggerEvents, this._testRunDirectory);  
          }  
          else  
          {  
            EqtTrace.Error("TestLoggerManager: Incorrect logger type: {0}", (object) logger.GetType());  
            return false;  
          }  
        }  
        else  
          ((ITestLoggerWithParameters) logger).Initialize((TestLoggerEvents) this._loggerEvents, this.UpdateLoggerParameters(parameters));  
      }  
      catch (Exception ex)  
      {  
        string str = string.IsNullOrEmpty(extensionUri) ? logger.GetType().ToString() : extensionUri;  
        EqtTrace.Error("TestLoggerManager: Error while initializing logger: {0}, Exception details: {1}", (object) str, (object) ex);  
        this._messageLogger.SendMessage(TestMessageLevel.Error, string.Format((IFormatProvider) CultureInfo.CurrentUICulture, Microsoft.VisualStudio.TestPlatform.Common.Resources.Resources.LoggerInitializationError, string.IsNullOrEmpty(extensionUri) ? (object) "type" : (object) "uri", string.IsNullOrEmpty(extensionUri) ? (object) logger.GetType().ToString() : (object) extensionUri, (object) ex));  
        throw new InvalidLoggerException("Error while initializing logger: " + str + ", Exception details: " + ex.Message);  
      }  
      return true;  
    }  

the strange thing is that my user is not blocked

Anyone else has happened?

Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
696 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Rios, Luis Antonio 1 Reputation point
    2022-06-16T13:26:43.753+00:00

    Thanks for answering, I solved it, in a part of my code I had a shared path where I didn't have access whit mi user, Visual 2022 detected it before starting the debug test .