Posts

Showing posts from October, 2013

PowerShell and .Net > 2.0

Recently I started working on a Windows machine to configure it as a build agent for jenkins. One of the requirements was to make PowerShell work with .Net Version 4.5. Windows 7 ships with PowerShell 2.0 by default (Don't go by the folder structure that still says v1.0). You can get the real details by typing $psversiontable in the PS console. The CLRVersion is the .Net Version loaded by the shell. Most often it is 2.0. Powershell runs by default on .Net version 2.0 or less. In case you get errors about loading assemblies even after loading them in the code, most likely you are not using the correct .Net Version. To load .Net versions greater than 2.0, the following settings need to be done. ERROR : Unable to find type [System.IO.Compression. CompressionLevel]: make sure that th e assembly containing this type is loaded. At C:\jenkins\workspace\SSENext- Core-Win\scripts\win\finalize- core-package.ps1: 9 char:56 + $Compression = [System.IO.Compression. CompressionLevel]...