Error messages upon IPMO

Jun 9, 2011 at 2:10 PM

I tried importing the module and received several errors. It appeared to do the initial generation, but it didn't work afterwards.

§ ITINFHR-PC {~} ipmo showuiThe term 'C:\Users\hrottenberg\Documents\WindowsPowerShell\Modules\showui\CodeGenerator\CodeGenerator\Rules\WpfCodeGenerationRules.ps1' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.At C:\Users\hrottenberg\Documents\WindowsPowerShell\Modules\showui\CodeGenerator\InstallShowUIAssembly.ps1:4 char:3+ . $psScriptRoot\CodeGenerator\Rules\WpfCodeGenerationRules.ps1+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    + CategoryInfo          : ObjectNotFound: (C:\Users\hrotte...rationRules.ps1:String)     [], CommandNotFoundException    + FullyQualifiedErrorId : CommandNotFoundException Exception calling "ReadAllText" with "1" argument(s): "Could not find a part of the path 'C:\Users\hrottenberg\Documents\WindowsPowerShell\Modules\showui\CodeGenerator\C#\ShowUIDependencyObjects.cs'."At C:\Users\hrottenberg\Documents\WindowsPowerShell\Modules\showui\CodeGenerator\InstallShowUIAssembly.ps1:112 char:5+     $controlNameDependencyObject = [IO.File]::ReadAllText("$psScriptRoot\C#\Show ...+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException    + FullyQualifiedErrorId : DirectoryNotFoundException Exception calling "ReadAllText" with "1" argument(s): "Could not find a part of the path 'C:\Users\hrottenberg\Documents\WindowsPowerShell\Modules\showui\CodeGenerator\C#\ShowUIAttribute.cs'."At C:\Users\hrottenberg\Documents\WindowsPowerShell\Modules\showui\CodeGenerator\InstallShowUIAssembly.ps1:113 char:5+     $attributeCode = [IO.File]::ReadAllText("$psScriptRoot\C#\ShowUIAttribute.cs ...+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException    + FullyQualifiedErrorId : DirectoryNotFoundException Exception calling "ReadAllText" with "1" argument(s): "Could not find a part of the path 'C:\Users\hrottenberg\Documents\WindowsPowerShell\Modules\showui\CodeGenerator\C#\LanguagePrimitivesValueConverter.cs'."At C:\Users\hrottenberg\Documents\WindowsPowerShell\Modules\showui\CodeGenerator\InstallShowUIAssembly.ps1:114 char:5+     $ValueConverter = [IO.File]::ReadAllText("$psScriptRoot\C#\LanguagePrimitive ...+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException    + FullyQualifiedErrorId : DirectoryNotFoundException Exception calling "ReadAllText" with "1" argument(s): "Could not find a part of the path 'C:\Users\hrottenberg\Documents\WindowsPowerShell\Modules\showui\CodeGenerator\C#\WPFJob.cs'."At C:\Users\hrottenberg\Documents\WindowsPowerShell\Modules\showui\CodeGenerator\InstallShowUIAssembly.ps1:115 char:5+     $wpfJob = [IO.File]::ReadAllText("$psScriptRoot\C#\WPFJob.cs")+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException    + FullyQualifiedErrorId : DirectoryNotFoundException Exception calling "ReadAllText" with "1" argument(s): "Could not find a part of the path 'C:\Users\hrottenberg\Documents\WindowsPowerShell\Modules\showui\CodeGenerator\C#\PowerShellDataSource.cs'."At C:\Users\hrottenberg\Documents\WindowsPowerShell\Modules\showui\CodeGenerator\InstallShowUIAssembly.ps1:116 char:5+     $wpfJob = [IO.File]::ReadAllText("$psScriptRoot\C#\PowerShellDataSource.cs")+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException    + FullyQualifiedErrorId : DirectoryNotFoundException WARNING: The generated type is not public.

I restarted my console and tried again, and got error #2

The term 'C:\Users\hrottenberg\Documents\WindowsPowerShell\Modules\showui\CodeGenerator\CodeGenerator\Rules\WpfCodeGenerationRules.ps1' is not recognized as the name of acmdlet, function, script file, or operable program. Check the spelling of the name, orif a path was included, verify that the path is correct and try again.At C:\Users\hrottenberg\Documents\WindowsPowerShell\Modules\showui\CodeGenerator\InstallShowUIAssembly.ps1:4 char:3+ . $psScriptRoot\CodeGenerator\Rules\WpfCodeGenerationRules.ps1+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    + CategoryInfo          : ObjectNotFound: (C:\Users\hrotte...rationRules.ps1:String)    [], CommandNotFoundException    + FullyQualifiedErrorId : CommandNotFoundException

Ordinarily, I'd go ahead and just figure it out and fix it. :) But I don't have time to troubleshoot it now. HTH anyway.

Coordinator
Jun 9, 2011 at 7:09 PM

Unfortunately, I can't get a repro.  It looks like somehow, $psScriptRoot (the module root) is magically getting set to the CodeGenerators folder.

When did you download/install?

Are you installing over anything?

Do you have WPK loaded as well?

James

Jul 31, 2011 at 4:35 AM

I received some errors very similar to these. I had a vanilla Windows 7 install on a laptop and didn't realize that .NET 3.5 (and 3.0) were not installed. I had 2 and 4 but none of the 3's. As soon as I added the Framework 3.5 from the "Turn Windows Features on" (under Programs and Features control panel) everything worked fine. I didn't even realize that 3.5 wasn't installed by default (at least on my system).

Joel.