Skip to content

unblock-file on linux failes with module could not be found #1207

Closed

Description

Steps to reproduce

unblock-file

Expected behavior

fail similarly to get-execution policy with operation is not supported on this platform

Actual behavior

unblock-file : Unable to load DLL 'api-ms-win-core-file-l1-2-1.dll': The 
specified module could not be found.
 (Exception from HRESULT: 0x8007007E)
At line:1 char:1
+ unblock-file ./.bash_history
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Unblock-File], DllNotFoundExc 
   eption
    + FullyQualifiedErrorId : System.DllNotFoundException,Microsoft.PowerShell 
   .Commands.UnblockFileCommand

Environment data

v0.5.0

> $PSVersionTable
Name                           Value                                           
----                           -----                                           
PSVersion                      5.1.10032.0                                     
PSEdition                      Linux                                           
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                         
BuildVersion                   3.0.0.0                                         
GitCommitId                    v0.5.0                                          
CLRVersion                                                                     
WSManStackVersion              1.0                                             
PSRemotingProtocolVersion      2.3                                             
SerializationVersion           1.1.0.1                                         
$ dotnet --info


$ git rev-parse HEAD; git status

Activity

  1. TravisEz13 commented on Jul 9, 2016

    @TravisEz13
    MemberAuthor

    Repro again on

    Name                           Value
    ----                           -----
    PSVersion                      5.1.10032.0
    PSEdition                      Linux
    PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
    BuildVersion                   3.0.0.0
    GitCommitId                    v0.6.0
    CLRVersion
    WSManStackVersion              1.0
    PSRemotingProtocolVersion      2.3
    SerializationVersion           1.1.0.1
    
  2. andyleejordan commented on Jul 15, 2016

    @andyleejordan
    Member

    This falls under #1122. The cmdlet simply makes no sense on some platforms, and we need platform specific modules so that it does not appear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions