I'm trying to use the SWISPowerShell cmdlets to unmanage a node and I was getting an error about a missing method -
System.MissingMethodException: Method not found: 'Void SolarWinds.Logging.Log.VerboseFormat(System.String, System.Object[])'.
at SolarWinds.InformationService.Contract2.InfoServiceProxy.ValidateUsedConnection()
at SolarWinds.InformationService.Contract2.InfoServiceProxy.Close()
at SwisPowerShell.BaseSwisCmdlet.CheckConnection()
at SwisPowerShell.InvokeSwisVerb.InternalProcessRecord()
at SwisPowerShell.BaseSwisCmdlet.DoWithExceptionReporting(Action work)
at System.Management.Automation.CommandProcessor.ProcessRecord()
I dug down a bit and it appears that method is missing from the SolarWinds.Logging assembly shipping with the 1.6 SDK.
It's easy to replicate with creating a SWIS connection and calling the close method -
$swis = Connect-SWIS #your specific details here
$swis.close()
Since each run of the Invoke-SWISVerb calls close on the connection first before opening it, I keep hitting the problem.
Was this a problem with the shipping assemblies or am I hitting some other error condition? I'm new to the Orion SDK in general, but very experienced in PowerShell and .NET.
Below is the method that calls the verbose logging method which does not exist -
// SolarWinds.InformationService.Contract2.InfoServiceProxy
privatevoidValidateUsedConnection()
{
if (this._infoService == null)
{
return;
}
if (this._activityMonitor == null || this._activityMonitor.RequestSent)
{
return;
}
InfoServiceProxy._log.Info("Non-used connection was opened. Information for developers. No impact on product functionality. See verbose log for more details.");
InfoServiceProxy._log.VerboseFormat("StackTrace: {0}", newobject[]
{
Environment.StackTrace
});
try
{
using (this._infoService.Query(newQueryXmlRequest("SELECT TOP 1 1 as Test FROM Metadata.Entity")))
{
}
}
catch
{
}
}