我在TeamCity Builds中使用简单的PowerShell脚本.
它需要System.IO.Compression.FileSystem并且代理已安装.NET 4.5.2.下面是安装的.NET框架
PSChildName Version Release Product
----------- ------- ------- -------
v2.0.50727 2.0.50727.5420
v3.0 3.0.30729.5420
Windows Communic... 3.0.4506.5420
Windows Presenta... 3.0.6920.5011
v3.5 3.5.30729.5420
Client 4.5.51209 379893 4.5.2
Full 4.5.51209 379893 4.5.2
Client 4.0.0.0
Run Code Online (Sandbox Code Playgroud)
PowerShell脚本具有以下行
[Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem");
Add-Type -AssemblyName System.IO.Compression.FileSystem
Run Code Online (Sandbox Code Playgroud)
在第二行,执行失败并出现错误
Add-Type : Cannot add type. The assembly 'System.IO.Compression.FileSystem' could not be found.
At C:\BuildAgent\someFile.ps1:104 char:13
+ Add-Type <<<< -AssemblyName System.IO.Compression.FileSystem
+ CategoryInfo : ObjectNotFound: (System.IO.Compression.FileSystem:String) [Add-Type], Exception
+ FullyQualifiedErrorId : ASSEMBLY_NOT_FOUND,Microsoft.PowerShell.Commands.AddTypeCommand
Run Code Online (Sandbox Code Playgroud)
奇怪,但我预计.NET 4.5.2,PowerShell应该能够从中加载程序集GAC
任何帮助将不胜感激
我们的子网中有 1 个内部ASE。在同一网络的不同子网中,我们部署了一台虚拟机,充当Azure DevOps Agent Windows v2
我们可以从访问此虚拟网络的计算机手动部署 Web 应用程序(使用 Visual Studio),但无法从 Azure DevOps 进行部署。
这是我们所做的
13.107.6.183和13.107.9.183(检查所有端口)-allowUntrusted我们在部署过程中遇到的错误是:
More Information: Could not connect to the remote computer ("{myapp}.scm.{customdomain}.com"). On the remote computer, make sure that Web Deploy is installed and that the required process ("Web Management Service") is started. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE.
Error: Unable to connect to the remote server
Error: A connection attempt …Run Code Online (Sandbox Code Playgroud) azure azure-deployment azure-app-service-envrmnt azure-devops