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

System.Security.AccessControl.ObjectSecurity #916

Open
geoffviola opened this issue Aug 18, 2016 · 8 comments
Open

System.Security.AccessControl.ObjectSecurity #916

geoffviola opened this issue Aug 18, 2016 · 8 comments

Comments

@geoffviola
Copy link

When installing cmake or cppcheck I get the same set of errors. Below is the output.

C:\WINDOWS\system32>choco install -y cmake
Chocolatey v0.10.0
Installing the following packages:
cmake
By installing you accept licenses for the packages.
cmake.install v3.6.0 [Approved] The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\System32\WindowsPowerShell\v1.0\types.ps1xml(3007) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject. The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\System32\WindowsPowerShell\v1.0\types.ps1xml(3014) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject. The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\System32\WindowsPowerShell\v1.0\types.ps1xml(3021) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject. The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\System32\WindowsPowerShell\v1.0\types.ps1xml(3028) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject. The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\System32\WindowsPowerShell\v1.0\types.ps1xml(3035) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject. ERROR: The term 'Test-Path' 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. The install of cmake.install was NOT successful. Error while running 'C:\ProgramData\chocolatey\lib\cmake.install\tools\chocolateyInstall.ps1'. See log for details.
cmake v3.6.0 [Approved]
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\System32\WindowsPowerShell\v1.0\types.ps1xml(3007) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\System32\WindowsPowerShell\v1.0\types.ps1xml(3014) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\System32\WindowsPowerShell\v1.0\types.ps1xml(3021) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\System32\WindowsPowerShell\v1.0\types.ps1xml(3028) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\System32\WindowsPowerShell\v1.0\types.ps1xml(3035) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
ERROR: The term 'Test-Path' 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.
The install of cmake was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\cmake\tools\chocolateyInstall.ps1'.
See log for details.
Chocolatey installed 0/2 packages. 2 packages failed. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Failures
- cmake (exited -1) - Error while running 'C:\ProgramData\chocolatey\lib\cmake\tools\chocolateyInstall.ps1'.
See log for details.
- cmake.install (exited -1) - Error while running 'C:\ProgramData\chocolatey\lib\cmake.install\tools\chocolateyInstall.ps1'.
See log for details.

It doesn't seem to be a package issue. I'm following these instructions: https://github.com/ros2/ros2/wiki/Windows-Development-Setup. The cmd program is "apps: vs2015 x64 native tools command prompt" run as administrator.

@ferventcoder
Copy link
Member

You are correct. This doesn't feel like a package issue.

Please submit the full log debug/verbose output (choco install -y -dv cmake). We'll need to understand your environment and the configuration section will provide that.

If you prefer you can also pull that out of C:\ProgramData\chocolatey\logs\chocolatey.log as it already captures that output in a debug/verbose format.

It may be helpful to create a gist with that output, and link that here.

@geoffviola
Copy link
Author

Here's the gist from the log file: https://gist.github.com/geoffviola/54cd5d1471ae9c3fd8afe87800ac6f32.

@ferventcoder
Copy link
Member

@ferventcoder
Copy link
Member

Can you confirm that following the fixes suggested in that document fix your environment as well?

@geoffviola
Copy link
Author

Thanks.

It's very similar. Unfortunately, this response does not fix it: NuGet/Home#1638 (comment). Editing C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe.config with the text that was mentioned did nothing.

Also, there is supposed to be a regular update. All Windows and Visual Studio Updates were already applied. This computer has Visual Studio 2013 and 2015. The 2015 was installed recently. I think it has the latest updates. I can run it for a few seconds before it locks. It probably locks for license issues, but it is not clear. In the few seconds VS 2015 runs, the nuget package manager command line will print out similar error messages.

I might just post there to see if anyone knows more.

@jberezanski
Copy link

Here PowerShell is hosted by Chocolatey, not by Visual Studio (and VS is not used in any way during package installation), so modifying devenv.exe.config will do nothing. To have an effect on Chocolatey, the dependentAssembly statements should be put in choco.exe.config next to choco.exe (so, C:\ProgramData\chocolatey\choco.exe.config), taking care to recreate the correct xml structure of .NET .config files.

@geoffviola
Copy link
Author

It works now. I moved the modified C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe.config to C:\ProgramData\chocolatey\choco.exe.config. I don't understand the xml structure. That file probably has extra settings in it. Now, the cmake and cppcheck packages install successfully. Thanks.

@hsiktas
Copy link

hsiktas commented Mar 8, 2017

I did the same but I used the .config file from VS2017 and added pete's lines at line 30.
choco.exe.config.txt (added .txt extension for GitHub attachments)

Chocolatey is now working again. 😎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants