Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sourcedelica opened this issue Sep 4, 2022 · 0 comments

Comments

@sourcedelica
Copy link

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant