Skip to content

Error in TypeData "System.IO.FileInfo": The member Size is already present. #82

Description

@sourcedelica

Trying to import the module I get the following error:

PS C:\Users\EPederson> Import-Module NTFSSecurity
Import-Module : The following error occurred while loading the extended type data file: Error in TypeData "System.IO.FileInfo": The member Size is
already present.
At line:1 char:1
+ Import-Module NTFSSecurity
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Import-Module], RuntimeException
    + FullyQualifiedErrorId : FormatXmlUpdateException,Microsoft.PowerShell.Commands.ImportModuleCommand

I tracked this down to a conflict with PSScriptTools and as a workaround I have forked this repo and removed the following lines from NTFSSecurity.types.ps1xml:

      <AliasProperty>
        <Name>Size</Name>
        <ReferencedMemberName>LengthOnDisk</ReferencedMemberName>
      </AliasProperty>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions