InitializeDefaultDrives error
I get the following error from asnp when I try to add drives in the InitializeDefaultDrives method.
"Object reference not set to an instance of an object."
Here is code that reproduces the problem.
protected override Collection<PSDriveInfo> InitializeDefaultDrives()
{
Collection<PSDriveInfo> drives = new Collection<PSDriveInfo>();
// PSDriveInfo psDrive = new PSDriveInfo("myDrive", base.ProviderInfo, "myRoot", "Description", base.Credential);
PSDriveInfo psDrive = new PSDriveInfo("myDrive", ProviderInfo, "myRoot", "Description", Credential);
drives.Add(psDrive);
return drives;
}// InitializeDefaultDrives
I get the same error even if I use the base ProviderInfo and Credentials. I don't get the error if I remove the "drives.Add(psDrive);" line.
Any ideas?
Thanks,
Phil
|