I am using simple PowerShell script in TeamCity Builds.
It requires System.IO.Compression.FileSystem
and the agent has .NET 4.5.2 installed. Below are
LoadWithPartialName()
is not always available; however since LoadWithPartialName()
is already working in your context, you could also use the Location property from the object that is returned to load the DLL.
Add-Type -Path ([Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem")).Location;