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

@earthlng's thing bitching about "Collections not found" #11

Closed
claustromaniac opened this issue Dec 2, 2018 · 2 comments
Closed

@earthlng's thing bitching about "Collections not found" #11

claustromaniac opened this issue Dec 2, 2018 · 2 comments

Comments

@claustromaniac
Copy link
Owner

@earthlng does this version work for you?

If that is not the case, does this one?

reference link

@earthlng
Copy link

earthlng commented Dec 3, 2018

bitching? bitch puhlease! it was simply a friendly FYI :)

this one still works: 38e7f34#diff-cab29a3f8309044c0459f253c305fb54

commit that broke it for me: 342bb47#diff-cab29a3f8309044c0459f253c305fb54

@claustromaniac
Copy link
Owner Author

claustromaniac commented Dec 3, 2018

I have some bad news for you: you have .NET installed. Otherwise, no version of the script (or PowerShell itself) would work on your end at all.

Try adding System. before Collections. in EDIT: I did that myself in 658519f

$matching_prefs = New-Object Collections.Generic.Hashset[string] # matching values
$differences = New-Object Collections.Generic.Hashset[string] # different values
$missing_in_A = New-Object Collections.Generic.Hashset[string] # not declared
$missing_in_B = New-Object Collections.Generic.Hashset[string]
$inactive_in_A = New-Object Collections.Generic.Hashset[string] # matching value but mismatching state
$inactive_in_B = New-Object Collections.Generic.Hashset[string]
$fully_mismatching = New-Object Collections.Generic.Hashset[string] # mismatching states and values
$bad_syntax_A = New-Object Collections.ArrayList # possible syntax errors
$bad_syntax_B = New-Object Collections.ArrayList
$dups_in_A = New-Object Collections.ArrayList # duplicates
$dups_in_B = New-Object Collections.ArrayList

If that doesn't work, type this in the PowerShell CLI:

$PSVersionTable.CLRVersion

It will return the value of that variable. If it is the following (or older)...

Major  Minor  Build  Revision
-----  -----  -----  --------
2      0      50727  8762

... then you must have disabled .NET 3.5 as a Windows component, or its assemblies aren't loading on your end for some other reason. Before you keep giving me friendly FYI (criticizing me for no good reason in the process): .NET 3.5 is a standard Windows 7 component, and the classes used in this script also exist in .NET Core (which is newer, and is the version of .NET available for Linux). The README explicitly states that this script requires PowerShell v2 and, guess what, the earliest version of Windows that comes with PS v2 installed is Win 7. So, adding .NET 3.5 as a dependency is no big deal (if you have Win 7, you have both requirements). I will still edit the README and state that this requires .NET 3.5, just in case.

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

2 participants