1

Closed

No repro: Compile error on initial import of module

description

The error below suggests I'm out of disk space, but I've got 49 GB free on C: and 74 GB free on E:. Could this in fact be because my SystemDrive is E: rather than C: ?
PS E:\try\aDL1\ADL1> IPMO SHOWUI
Add-Type : (0) : Source file 'e:\Users\bharris\AppData\Local\Temp\lilzmsgf.0.cs' could not be opened ('Not enough
storage is available to complete this operation. ')
(1) : namespace AutoGenerateCmdlets74752052
At E:\Users\bharris\Documents\WindowsPowerShell\Modules\SHOWUI\CodeGenerator\Add-UiModule.ps1:228 char:13
+             Add-Type @addTypeParameters
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (error CS1504: S...s operation. '):CompilerError) [Add-Type], Exception
    + FullyQualifiedErrorId : SOURCE_CODE_ERROR,Microsoft.PowerShell.Commands.AddTypeCommand

Add-Type : Cannot add type. There were compilation errors.
At E:\Users\bharris\Documents\WindowsPowerShell\Modules\SHOWUI\CodeGenerator\Add-UiModule.ps1:228 char:13
+             Add-Type @addTypeParameters
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Add-Type], InvalidOperationException
    + FullyQualifiedErrorId : COMPILER_ERRORS,Microsoft.PowerShell.Commands.AddTypeCommand

Import-Module : The specified module
'E:\Users\bharris\Documents\WindowsPowerShell\Modules\SHOWUI\GeneratedAssemblies\ShowUI.CLR4.0.30319.18051.dll' was
not loaded because no valid module file was found in any module directory.
At E:\Users\bharris\Documents\WindowsPowerShell\Modules\SHOWUI\ShowUI.psm1:129 char:28
+         $importedModule  = Import-Module $CommandsPath, $CoreOutputPath -PassThr ...
+                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (E:\Users\bharri...30319.18051.dll:String) [Import-Module], FileNot
   FoundException
    + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand
Closed Sep 3, 2013 at 5:38 AM by Jaykul
I'd be interested to hear if anyone's had any problems compiling anything else when using Add-Type with non C: system-drives (I guess there aren't many testers)

comments

BurtHarris wrote Sep 1, 2013 at 9:36 PM

Delete module and re-installed. The problem didn't reproduce this time, but other strange behavior continues.

I'll resolve this if I can't reproduce it.

BurtHarris wrote Sep 1, 2013 at 10:04 PM

I'm not sure what caused it. I guess you can resolve this no repro. I don't seem to have permissions to do so.