Move DLL load into PSD1

This commit is contained in:
jhoneill
2019-11-30 15:28:31 +00:00
parent 6508043bc0
commit d1c347285f
2 changed files with 3 additions and 5 deletions

View File

@@ -1,4 +1,7 @@
@{
# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = @('.\EPPlus.dll')
# Script module or binary module file associated with this manifest.
RootModule = 'ImportExcel.psm1'
@@ -45,9 +48,6 @@ Check out the How To Videos https://www.youtube.com/watch?v=U3Ne_yX4tYo&list=PL5
# Modules that must be imported into the global environment prior to importing this module
# RequiredModules = @()
# Assemblies that must be loaded prior to importing this module
# RequiredAssemblies = @()
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
# ScriptsToProcess = @()

View File

@@ -1,6 +1,4 @@
#region import everything we need
Add-Type -Path "$($PSScriptRoot)\EPPlus.dll"
try {[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")}
catch {Write-Warning -Message "System.Drawing could not be loaded. Color and font look-ups may not be available."}