How to import Package (not module)?

Welcome Forums General PowerShell Q&A How to import Package (not module)?

Viewing 0 reply threads
  • Author
    • #228703
      Topics: 39
      Replies: 108
      Points: 620
      Rank: Major Contributor

      I installed the SharpDx package from Here but is there a way to import it, just like import-module, so that I wouldnt have to specify the assembly (dll) path(s)?

      For now, the only way I found is to use Add-Type to reference the assembly but is there no other way besides this?

      #Reference where you kept the dxSharp files
      $dxSharpPath = 'Path\To\DLLs'
      #Load the sharpDX Libraries
      Add-Type -Path "$dxSharpPath\sharpdx.dll"
      Add-Type -Path "$dxSharpPath\Sharpdx.Directinput.dll"
      #Create new DirectInput object
      $dInput = New-Object -TypeName SharpDX.DirectInput.DirectInput

      I am ultimately trying to create the directinput object


Viewing 0 reply threads
  • You must be logged in to reply to this topic.