Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to navigate to directory, ZLocation disables itself #24

Closed
snowe2010 opened this issue Aug 19, 2015 · 12 comments
Closed

Trying to navigate to directory, ZLocation disables itself #24

snowe2010 opened this issue Aug 19, 2015 · 12 comments

Comments

@snowe2010
Copy link

λ ~ z oper
Add-Type : (0) : 'c:\Users\tyler.thrailkill\AppData\Local\Temp\CSC8A531E0BAE344D8CAACE866C2CDDC050.TMP' is not a valid Win32 resource file
(1) : using System;
At C:\Program Files\WindowsPowerShell\Modules\ZLocation\0.1.0\ZLocation.Storage.psm1:68 char:42
+ ... e-Command { Add-Type -ReferencedAssemblies System.ServiceModel -TypeD ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (error CS1583: '...2 resource file:CompilerError) [Add-Type], Exception
    + FullyQualifiedErrorId : SOURCE_CODE_ERROR,Microsoft.PowerShell.Commands.AddTypeCommand

Add-Type : Cannot add type. Compilation errors occurred.
At C:\Program Files\WindowsPowerShell\Modules\ZLocation\0.1.0\ZLocation.Storage.psm1:68 char:42
+ ... e-Command { Add-Type -ReferencedAssemblies System.ServiceModel -TypeD ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Add-Type], InvalidOperationException
    + FullyQualifiedErrorId : COMPILER_ERRORS,Microsoft.PowerShell.Commands.AddTypeCommand

New-Object : Cannot find type [System.ServiceModel.ChannelFactory`1[[ZLocation.IService]]]: verify that the assembly containing this type is loaded.
At C:\Program Files\WindowsPowerShell\Modules\ZLocation\0.1.0\ZLocation.Storage.psm1:27 char:24
+ ... peFactory = New-Object -TypeName 'System.ServiceModel.ChannelFactory` ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidType: (:) [New-Object], PSArgumentException
    + FullyQualifiedErrorId : TypeNotFound,Microsoft.PowerShell.Commands.NewObjectCommand

You cannot call a method on a null-valued expression.
At C:\Program Files\WindowsPowerShell\Modules\ZLocation\0.1.0\ZLocation.Storage.psm1:31 char:9
+         $Script:pipeProxy = $pipeFactory.CreateChannel()
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

The variable '$Script:pipeProxy' cannot be retrieved because it has not been set.
At C:\Program Files\WindowsPowerShell\Modules\ZLocation\0.1.0\ZLocation.Storage.psm1:33 char:5
+     $Script:pipeProxy
+     ~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (Script:pipeProxy:String) [], RuntimeException
    + FullyQualifiedErrorId : VariableIsUndefined

Add-Type : (0) : 'c:\Users\tyler.thrailkill\AppData\Local\Temp\CSCC370CD6B1B00420DADFD74FE529EFB28.TMP' is not a valid Win32 resource file
(1) : using System;
At C:\Program Files\WindowsPowerShell\Modules\ZLocation\0.1.0\ZLocation.Storage.psm1:68 char:42
+ ... e-Command { Add-Type -ReferencedAssemblies System.ServiceModel -TypeD ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (error CS1583: '...2 resource file:CompilerError) [Add-Type], Exception
    + FullyQualifiedErrorId : SOURCE_CODE_ERROR,Microsoft.PowerShell.Commands.AddTypeCommand

WARNING: ZLocation Pipe become broken :( ZLocation is now self-disabled.
You need to restart all PowerShell instances to re-enable ZLocation.
Please continue your work and do it, when convinient.
You can report the problem on https://github.com/vors/ZLocation/issues
WARNING: Cannot find matching location
PS>
@Kethku
Copy link

Kethku commented Aug 19, 2015

In my experience there are certain folder configurations that can break Z-Location. I haven't been able to pin down exactly when it happens. Does this happen any time you try to use z, or just some times or in certain folders?

@snowe2010
Copy link
Author

It wasn't happening last week with this folder, I went on vacation and it started happening when I came back. It seems to be happening with every folder I try

@vors
Copy link
Owner

vors commented Aug 19, 2015

I think the first line gives a clue

Add-Type : (0) : 'c:\Users\tyler.thrailkill\AppData\Local\Temp\CSC8A531E0BAE344D8CAACE866C2CDDC050.TMP' is not a valid Win32 resource file (1) : using System;

Add-Type creates a temp file to compile C# code with csc.exe.
For some reason it created a file, but trying to compile it in some weird way.

Maybe you have a function that hides built-in Add-Type.
Can you try to compile some simple C# class, like

using System;
namespace foo
{
public class Bar {}
}

@vors vors closed this as completed Aug 19, 2015
@vors vors reopened this Aug 19, 2015
@vors
Copy link
Owner

vors commented Aug 19, 2015

To do that, run

Add-Type @"
using System;
namespace foo
{
public class Bar {}
}
"@

@snowe2010
Copy link
Author

That crashes it.

λ ~ Add-Type @"
>> using System;
>> namespace foo
>> {
>> public class Bar {}
>> }
>> "@
>>
Add-Type : (0) : 'c:\Users\tyler.thrailkill\AppData\Local\Temp\CSC594544A26F3640EEB18BED5DEED9A06B.TMP' is not a valid Win32 resource file
(1) : using System;
At line:1 char:1
+ Add-Type @"
+ ~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (error CS1583: '...2 resource file:CompilerError) [Add-Type], Exception
    + FullyQualifiedErrorId : SOURCE_CODE_ERROR,Microsoft.PowerShell.Commands.AddTypeCommand

Add-Type : Cannot add type. Compilation errors occurred.
At line:1 char:1
+ Add-Type @"
+ ~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Add-Type], InvalidOperationException
    + FullyQualifiedErrorId : COMPILER_ERRORS,Microsoft.PowerShell.Commands.AddTypeCommand

λ ~

@vors
Copy link
Owner

vors commented Aug 20, 2015

Can you restart PowerShell and provide output of the following commands

$PSVersionTable
Get-Command Add-Type | fl

@snowe2010
Copy link
Author

λ ~ $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.0.10105.0
WSManStackVersion              3.0
SerializationVersion           1.1.0.1
CLRVersion                     4.0.30319.18063
BuildVersion                   10.0.10105.0
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3


λ ~ Get-Command Add-Type | fl


Name             : Add-Type
CommandType      : Cmdlet
Definition       :
                   Add-Type [-TypeDefinition] <string> [-Language <Language>] [-ReferencedAssemblies <string[]>] [-CodeDomProvider <CodeDomProvider>] [-CompilerParameters <CompilerParameters>] [-OutputAssembly <string>] [-OutputType
                   <OutputAssemblyType>] [-PassThru] [-IgnoreWarnings] [<CommonParameters>]

                   Add-Type [-Name] <string> [-MemberDefinition] <string[]> [-Namespace <string>] [-UsingNamespace <string[]>] [-Language <Language>] [-ReferencedAssemblies <string[]>] [-CodeDomProvider <CodeDomProvider>]
                   [-CompilerParameters <CompilerParameters>] [-OutputAssembly <string>] [-OutputType <OutputAssemblyType>] [-PassThru] [-IgnoreWarnings] [<CommonParameters>]

                   Add-Type [-Path] <string[]> [-ReferencedAssemblies <string[]>] [-CompilerParameters <CompilerParameters>] [-OutputAssembly <string>] [-OutputType <OutputAssemblyType>] [-PassThru] [-IgnoreWarnings] [<CommonParameters>]

                   Add-Type -LiteralPath <string[]> [-ReferencedAssemblies <string[]>] [-CompilerParameters <CompilerParameters>] [-OutputAssembly <string>] [-OutputType <OutputAssemblyType>] [-PassThru] [-IgnoreWarnings]
                   [<CommonParameters>]

                   Add-Type -AssemblyName <string[]> [-PassThru] [-IgnoreWarnings] [<CommonParameters>]

Path             :
AssemblyInfo     :
DLL              : C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.PowerShell.Commands.Utility\v4.0_3.0.0.0__31bf3856ad364e35\Microsoft.PowerShell.Commands.Utility.dll
HelpFile         : Microsoft.PowerShell.Commands.Utility.dll-Help.xml
ParameterSets    : {[-TypeDefinition] <string> [-Language <Language>] [-ReferencedAssemblies <string[]>] [-CodeDomProvider <CodeDomProvider>] [-CompilerParameters <CompilerParameters>] [-OutputAssembly <string>] [-OutputType
                   <OutputAssemblyType>] [-PassThru] [-IgnoreWarnings] [<CommonParameters>], [-Name] <string> [-MemberDefinition] <string[]> [-Namespace <string>] [-UsingNamespace <string[]>] [-Language <Language>] [-ReferencedAssemblies
                   <string[]>] [-CodeDomProvider <CodeDomProvider>] [-CompilerParameters <CompilerParameters>] [-OutputAssembly <string>] [-OutputType <OutputAssemblyType>] [-PassThru] [-IgnoreWarnings] [<CommonParameters>], [-Path]
                   <string[]> [-ReferencedAssemblies <string[]>] [-CompilerParameters <CompilerParameters>] [-OutputAssembly <string>] [-OutputType <OutputAssemblyType>] [-PassThru] [-IgnoreWarnings] [<CommonParameters>], -LiteralPath
                   <string[]> [-ReferencedAssemblies <string[]>] [-CompilerParameters <CompilerParameters>] [-OutputAssembly <string>] [-OutputType <OutputAssemblyType>] [-PassThru] [-IgnoreWarnings] [<CommonParameters>]...}
ImplementingType : Microsoft.PowerShell.Commands.AddTypeCommand
Verb             : Add
Noun             : Type



λ ~

@snowe2010
Copy link
Author

Any more help on this? I really like using zlocation, I don't want to have to find another solution :(

@Kethku
Copy link

Kethku commented Aug 26, 2015

One idea that comes to mind is that there is really no reason other than convenience we are compiling c# on the fly. Plenty of powershell plugins compile ahead of time and then use the dll that is generated. I argue this has extra benefits as well such as being able to use visual studio for development. A move to that structure would also probably solve your problem as it seems to be triggered from Add-Type.
This wouldn't really be a quick fix though.

@vors
Copy link
Owner

vors commented Aug 26, 2015

@snowe2010

  1. You can use https://github.com/tkellogg/Jump-Location for now, it provides same functionality.

This triggers compiler error CS1583.

Add-Type @"
using System;
namespace foo
{
public class Bar {}
}
"@

Let's try to nail down this problem.
You would not be able to use any PS code that uses Add-Type, which is a lot.
Can you get the full error message from the error: run the command and then $error[0] | fl
I'm interested in this ellipsis: InvalidData: (error CS1583: '**...**2 resource file

@Devagamster
This is a reasonable approach. Meanwhile, I would prefer to avoid distribute dll for that particular module, because it would make module upgrade story pretty painful (require close all PS instances and start a new one with -noprofile). It's probably can be smartly scripted (like PSReadLine), but I would rather avoid it.

In future, I would like to remove all C# code and replace it will PowerShell classes.

@snowe2010
Copy link
Author

λ ~ Add-Type @"
>>> using System;
>>> namespace foo
>>> {
>>> public class Bar {}
>>> }
>>> "@
Add-Type : (0) : 'c:\Users\tyler.thrailkill\AppData\Local\Temp\CSCD1F012F0D9DC4805A3A02912A70BAE4.TMP' is not a valid Win32 resource file
(1) : using System;
At line:1 char:1
+ Add-Type @"
+ ~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (error CS1583: '...2 resource file:CompilerError) [Add-Type], Exception
    + FullyQualifiedErrorId : SOURCE_CODE_ERROR,Microsoft.PowerShell.Commands.AddTypeCommand

Add-Type : Cannot add type. Compilation errors occurred.
At line:1 char:1
+ Add-Type @"
+ ~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Add-Type], InvalidOperationException
    + FullyQualifiedErrorId : COMPILER_ERRORS,Microsoft.PowerShell.Commands.AddTypeCommand

λ ~ $error[0] | fl
Add-Type : Cannot add type. Compilation errors occurred.
At line:1 char:1
+ Add-Type @"
+ ~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Add-Type], InvalidOperationException
    + FullyQualifiedErrorId : COMPILER_ERRORS,Microsoft.PowerShell.Commands.AddTypeCommand

λ ~ $error
Add-Type : Cannot add type. Compilation errors occurred.
At line:1 char:1
+ Add-Type @"
+ ~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Add-Type], InvalidOperationException
    + FullyQualifiedErrorId : COMPILER_ERRORS,Microsoft.PowerShell.Commands.AddTypeCommand

Add-Type : (0) : 'c:\Users\tyler.thrailkill\AppData\Local\Temp\CSCD1F012F0D9DC4805A3A02912A70BAE4.TMP' is not a valid Win32 resource file
(1) : using System;
At line:1 char:1
+ Add-Type @"
+ ~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (error CS1583: '...2 resource file:CompilerError) [Add-Type], Exception
    + FullyQualifiedErrorId : SOURCE_CODE_ERROR,Microsoft.PowerShell.Commands.AddTypeCommand

Cannot convert argument "options", with value: "PSConsoleUtilities.PSConsoleReadlineOptions", for "SetOptions" to type "PSConsoleUtilities.SetPSReadlineOption": "Cannot convert the "PSConsoleUtilities.PSConsoleReadlineOptions" value of
type "PSConsoleUtilities.PSConsoleReadlineOptions" to type "PSConsoleUtilities.SetPSReadlineOption"."
At C:\Users\tyler.thrailkill\Documents\WindowsPowerShell\Modules\PSReadline\PSReadLine.psm1:31 char:13
+             [PSConsoleUtilities.PSConsoleReadLine]::SetOptions($optio ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodArgumentConversionInvalidCastArgument

Get-Command : The term 'Jump-Location' 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\tyler.thrailkill\Documents\WindowsPowerShell\Modules\Jump.Location\Load.ps1:12 char:11
+ if (-Not (Get-Command Jump-Location -ErrorAction SilentlyContinue)) {
+           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Jump-Location:String) [Get-Command], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException,Microsoft.PowerShell.Commands.GetCommandCommand

λ ~ Add-Type @"
>>> using System;
>>> namespace foo
>>> {
>>> public class Bar {}
>>> }
>>> "@
Add-Type : (0) : 'c:\Users\tyler.thrailkill\AppData\Local\Temp\CSC88F9FBE5D7CA4854BA7C44FD45F17095.TMP' is not a valid Win32 resource file
(1) : using System;
At line:1 char:1
+ Add-Type @"
+ ~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (error CS1583: '...2 resource file:CompilerError) [Add-Type], Exception
    + FullyQualifiedErrorId : SOURCE_CODE_ERROR,Microsoft.PowerShell.Commands.AddTypeCommand

Add-Type : Cannot add type. Compilation errors occurred.
At line:1 char:1
+ Add-Type @"
+ ~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Add-Type], InvalidOperationException
    + FullyQualifiedErrorId : COMPILER_ERRORS,Microsoft.PowerShell.Commands.AddTypeCommand

λ ~ $error
Add-Type : Cannot add type. Compilation errors occurred.
At line:1 char:1
+ Add-Type @"
+ ~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Add-Type], InvalidOperationException
    + FullyQualifiedErrorId : COMPILER_ERRORS,Microsoft.PowerShell.Commands.AddTypeCommand

Add-Type : (0) : 'c:\Users\tyler.thrailkill\AppData\Local\Temp\CSC88F9FBE5D7CA4854BA7C44FD45F17095.TMP' is not a valid Win32 resource file
(1) : using System;
At line:1 char:1
+ Add-Type @"
+ ~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (error CS1583: '...2 resource file:CompilerError) [Add-Type], Exception
    + FullyQualifiedErrorId : SOURCE_CODE_ERROR,Microsoft.PowerShell.Commands.AddTypeCommand

Add-Type : Cannot add type. Compilation errors occurred.
At line:1 char:1
+ Add-Type @"
+ ~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Add-Type], InvalidOperationException
    + FullyQualifiedErrorId : COMPILER_ERRORS,Microsoft.PowerShell.Commands.AddTypeCommand

Add-Type : (0) : 'c:\Users\tyler.thrailkill\AppData\Local\Temp\CSCD1F012F0D9DC4805A3A02912A70BAE4.TMP' is not a valid Win32 resource file
(1) : using System;
At line:1 char:1
+ Add-Type @"
+ ~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (error CS1583: '...2 resource file:CompilerError) [Add-Type], Exception
    + FullyQualifiedErrorId : SOURCE_CODE_ERROR,Microsoft.PowerShell.Commands.AddTypeCommand

Cannot convert argument "options", with value: "PSConsoleUtilities.PSConsoleReadlineOptions", for "SetOptions" to type "PSConsoleUtilities.SetPSReadlineOption": "Cannot convert the "PSConsoleUtilities.PSConsoleReadlineOptions" value of
type "PSConsoleUtilities.PSConsoleReadlineOptions" to type "PSConsoleUtilities.SetPSReadlineOption"."
At C:\Users\tyler.thrailkill\Documents\WindowsPowerShell\Modules\PSReadline\PSReadLine.psm1:31 char:13
+             [PSConsoleUtilities.PSConsoleReadLine]::SetOptions($optio ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodArgumentConversionInvalidCastArgument

Get-Command : The term 'Jump-Location' 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\tyler.thrailkill\Documents\WindowsPowerShell\Modules\Jump.Location\Load.ps1:12 char:11
+ if (-Not (Get-Command Jump-Location -ErrorAction SilentlyContinue)) {
+           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Jump-Location:String) [Get-Command], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException,Microsoft.PowerShell.Commands.GetCommandCommand

λ ~

Running zlocation causes a crash, which then, when trying to access the $errors, crashes again. I have to click a Cancel button that pops up in a message box telling me "Microsoft Resource File To COFF Object Conversion Utility has stopped working":

λ ~ z op
Add-Type : (0) : 'c:\Users\tyler.thrailkill\AppData\Local\Temp\CSCB4DA7C969B92418CAD7ADAA5D1461311.TMP' is not a valid Win32 resource file
(1) : using System;
At C:\Program Files\WindowsPowerShell\Modules\ZLocation\0.1.0\ZLocation.Storage.psm1:68 char:42
+ ... e-Command { Add-Type -ReferencedAssemblies System.ServiceModel -TypeD ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (error CS1583: '...2 resource file:CompilerError) [Add-Type], Exception
    + FullyQualifiedErrorId : SOURCE_CODE_ERROR,Microsoft.PowerShell.Commands.AddTypeCommand

Add-Type : Cannot add type. Compilation errors occurred.
At C:\Program Files\WindowsPowerShell\Modules\ZLocation\0.1.0\ZLocation.Storage.psm1:68 char:42
+ ... e-Command { Add-Type -ReferencedAssemblies System.ServiceModel -TypeD ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Add-Type], InvalidOperationException
    + FullyQualifiedErrorId : COMPILER_ERRORS,Microsoft.PowerShell.Commands.AddTypeCommand

New-Object : Cannot find type [System.ServiceModel.ChannelFactory`1[[ZLocation.IService]]]: verify that the assembly containing this type is loaded.
At C:\Program Files\WindowsPowerShell\Modules\ZLocation\0.1.0\ZLocation.Storage.psm1:27 char:24
+ ... peFactory = New-Object -TypeName 'System.ServiceModel.ChannelFactory` ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidType: (:) [New-Object], PSArgumentException
    + FullyQualifiedErrorId : TypeNotFound,Microsoft.PowerShell.Commands.NewObjectCommand

You cannot call a method on a null-valued expression.
At C:\Program Files\WindowsPowerShell\Modules\ZLocation\0.1.0\ZLocation.Storage.psm1:31 char:9
+         $Script:pipeProxy = $pipeFactory.CreateChannel()
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

The variable '$Script:pipeProxy' cannot be retrieved because it has not been set.
At C:\Program Files\WindowsPowerShell\Modules\ZLocation\0.1.0\ZLocation.Storage.psm1:33 char:5
+     $Script:pipeProxy
+     ~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (Script:pipeProxy:String) [], RuntimeException
    + FullyQualifiedErrorId : VariableIsUndefined

Add-Type : (0) : 'c:\Users\tyler.thrailkill\AppData\Local\Temp\CSC2E95FEE469134C1EADD57773B4D99875.TMP' is not a valid Win32 resource file
(1) : using System;
At C:\Program Files\WindowsPowerShell\Modules\ZLocation\0.1.0\ZLocation.Storage.psm1:68 char:42
+ ... e-Command { Add-Type -ReferencedAssemblies System.ServiceModel -TypeD ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (error CS1583: '...2 resource file:CompilerError) [Add-Type], Exception
    + FullyQualifiedErrorId : SOURCE_CODE_ERROR,Microsoft.PowerShell.Commands.AddTypeCommand

WARNING: ZLocation Pipe become broken :( ZLocation is now self-disabled.
You need to restart all PowerShell instances to re-enable ZLocation.
Please continue your work and do it, when convinient.
You can report the problem on https://github.com/vors/ZLocation/issues
WARNING: Cannot find matching location
PS>$error[0] | fl
Cannot add type. Compilation errors occurred.
PS>$error
Cannot add type. Compilation errors occurred.
Add-Type : Cannot add type. Compilation errors occurred.
At C:\Program Files\WindowsPowerShell\Modules\ZLocation\0.1.0\ZLocation.Storage.psm1:68 char:42
+ ... e-Command { Add-Type -ReferencedAssemblies System.ServiceModel -TypeD ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Add-Type], InvalidOperationException
    + FullyQualifiedErrorId : COMPILER_ERRORS,Microsoft.PowerShell.Commands.AddTypeCommand

Add-Type : (0) : 'c:\Users\tyler.thrailkill\AppData\Local\Temp\CSC827B723D7B8248D690FC6816B2399AB7.TMP' is not a valid Win32 resource file
(1) : using System;
At C:\Program Files\WindowsPowerShell\Modules\ZLocation\0.1.0\ZLocation.Storage.psm1:68 char:42
+ ... e-Command { Add-Type -ReferencedAssemblies System.ServiceModel -TypeD ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (error CS1583: '...2 resource file:CompilerError) [Add-Type], Exception
    + FullyQualifiedErrorId : SOURCE_CODE_ERROR,Microsoft.PowerShell.Commands.AddTypeCommand

Cannot add type. Compilation errors occurred.
Add-Type : Cannot add type. Compilation errors occurred.
At C:\Program Files\WindowsPowerShell\Modules\ZLocation\0.1.0\ZLocation.Storage.psm1:68 char:42
+ ... e-Command { Add-Type -ReferencedAssemblies System.ServiceModel -TypeD ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Add-Type], InvalidOperationException
    + FullyQualifiedErrorId : COMPILER_ERRORS,Microsoft.PowerShell.Commands.AddTypeCommand

Add-Type : (0) : 'c:\Users\tyler.thrailkill\AppData\Local\Temp\CSCA66F3F19D78845408391A234F42850E8.TMP' is not a valid Win32 resource file
(1) : using System;
At C:\Program Files\WindowsPowerShell\Modules\ZLocation\0.1.0\ZLocation.Storage.psm1:68 char:42
+ ... e-Command { Add-Type -ReferencedAssemblies System.ServiceModel -TypeD ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (error CS1583: '...2 resource file:CompilerError) [Add-Type], Exception
    + FullyQualifiedErrorId : SOURCE_CODE_ERROR,Microsoft.PowerShell.Commands.AddTypeCommand

Add-Type : Cannot add type. Compilation errors occurred.
At C:\Program Files\WindowsPowerShell\Modules\ZLocation\0.1.0\ZLocation.Storage.psm1:68 char:42
+ ... e-Command { Add-Type -ReferencedAssemblies System.ServiceModel -TypeD ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Add-Type], InvalidOperationException
    + FullyQualifiedErrorId : COMPILER_ERRORS,Microsoft.PowerShell.Commands.AddTypeCommand

Add-Type : (0) : 'c:\Users\tyler.thrailkill\AppData\Local\Temp\CSC2E95FEE469134C1EADD57773B4D99875.TMP' is not a valid Win32 resource file
(1) : using System;
At C:\Program Files\WindowsPowerShell\Modules\ZLocation\0.1.0\ZLocation.Storage.psm1:68 char:42
+ ... e-Command { Add-Type -ReferencedAssemblies System.ServiceModel -TypeD ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (error CS1583: '...2 resource file:CompilerError) [Add-Type], Exception
    + FullyQualifiedErrorId : SOURCE_CODE_ERROR,Microsoft.PowerShell.Commands.AddTypeCommand

You cannot call a method on a null-valued expression.
At C:\Program Files\WindowsPowerShell\Modules\ZLocation\0.1.0\ZLocation.Storage.psm1:117 char:13
+             $service.Noop()
+             ~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

The variable '$Script:pipeProxy' cannot be retrieved because it has not been set.
At C:\Program Files\WindowsPowerShell\Modules\ZLocation\0.1.0\ZLocation.Storage.psm1:33 char:5
+     $Script:pipeProxy
+     ~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (Script:pipeProxy:String) [], RuntimeException
    + FullyQualifiedErrorId : VariableIsUndefined

You cannot call a method on a null-valued expression.
At C:\Program Files\WindowsPowerShell\Modules\ZLocation\0.1.0\ZLocation.Storage.psm1:31 char:9
+         $Script:pipeProxy = $pipeFactory.CreateChannel()
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

New-Object : Cannot find type [System.ServiceModel.ChannelFactory`1[[ZLocation.IService]]]: verify that the assembly containing this type is loaded.
At C:\Program Files\WindowsPowerShell\Modules\ZLocation\0.1.0\ZLocation.Storage.psm1:27 char:24
+ ... peFactory = New-Object -TypeName 'System.ServiceModel.ChannelFactory` ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidType: (:) [New-Object], PSArgumentException
    + FullyQualifiedErrorId : TypeNotFound,Microsoft.PowerShell.Commands.NewObjectCommand

Add-Type : Cannot add type. Compilation errors occurred.
At C:\Program Files\WindowsPowerShell\Modules\ZLocation\0.1.0\ZLocation.Storage.psm1:68 char:42
+ ... e-Command { Add-Type -ReferencedAssemblies System.ServiceModel -TypeD ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Add-Type], InvalidOperationException
    + FullyQualifiedErrorId : COMPILER_ERRORS,Microsoft.PowerShell.Commands.AddTypeCommand

Add-Type : (0) : 'c:\Users\tyler.thrailkill\AppData\Local\Temp\CSCB4DA7C969B92418CAD7ADAA5D1461311.TMP' is not a valid Win32 resource file
(1) : using System;
At C:\Program Files\WindowsPowerShell\Modules\ZLocation\0.1.0\ZLocation.Storage.psm1:68 char:42
+ ... e-Command { Add-Type -ReferencedAssemblies System.ServiceModel -TypeD ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (error CS1583: '...2 resource file:CompilerError) [Add-Type], Exception
    + FullyQualifiedErrorId : SOURCE_CODE_ERROR,Microsoft.PowerShell.Commands.AddTypeCommand

Add-Type : Cannot add type. Compilation errors occurred.
At line:1 char:1
+ Add-Type @"
+ ~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Add-Type], InvalidOperationException
    + FullyQualifiedErrorId : COMPILER_ERRORS,Microsoft.PowerShell.Commands.AddTypeCommand

Add-Type : (0) : 'c:\Users\tyler.thrailkill\AppData\Local\Temp\CSC88F9FBE5D7CA4854BA7C44FD45F17095.TMP' is not a valid Win32 resource file
(1) : using System;
At line:1 char:1
+ Add-Type @"
+ ~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (error CS1583: '...2 resource file:CompilerError) [Add-Type], Exception
    + FullyQualifiedErrorId : SOURCE_CODE_ERROR,Microsoft.PowerShell.Commands.AddTypeCommand

Add-Type : Cannot add type. Compilation errors occurred.
At line:1 char:1
+ Add-Type @"
+ ~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Add-Type], InvalidOperationException
    + FullyQualifiedErrorId : COMPILER_ERRORS,Microsoft.PowerShell.Commands.AddTypeCommand

Add-Type : (0) : 'c:\Users\tyler.thrailkill\AppData\Local\Temp\CSCD1F012F0D9DC4805A3A02912A70BAE4.TMP' is not a valid Win32 resource file
(1) : using System;
At line:1 char:1
+ Add-Type @"
+ ~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (error CS1583: '...2 resource file:CompilerError) [Add-Type], Exception
    + FullyQualifiedErrorId : SOURCE_CODE_ERROR,Microsoft.PowerShell.Commands.AddTypeCommand

Cannot convert argument "options", with value: "PSConsoleUtilities.PSConsoleReadlineOptions", for "SetOptions" to type "PSConsoleUtilities.SetPSReadlineOption": "Cannot convert the "PSConsoleUtilities.PSConsoleReadlineOptions" value of
type "PSConsoleUtilities.PSConsoleReadlineOptions" to type "PSConsoleUtilities.SetPSReadlineOption"."
At C:\Users\tyler.thrailkill\Documents\WindowsPowerShell\Modules\PSReadline\PSReadLine.psm1:31 char:13
+             [PSConsoleUtilities.PSConsoleReadLine]::SetOptions($optio ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodArgumentConversionInvalidCastArgument

Get-Command : The term 'Jump-Location' 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\tyler.thrailkill\Documents\WindowsPowerShell\Modules\Jump.Location\Load.ps1:12 char:11
+ if (-Not (Get-Command Jump-Location -ErrorAction SilentlyContinue)) {
+           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Jump-Location:String) [Get-Command], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException,Microsoft.PowerShell.Commands.GetCommandCommand

PS>

@vors
Copy link
Owner

vors commented Aug 29, 2018

Should be fixed after switch to LiteDB

@vors vors closed this as completed Aug 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants