如何在 PowerShell 5 中编译 ASP.NET Visual Studio 项目
How to compile an ASP.NET Visual Studio project in PowerShell 5
在命令提示符中,我会使用:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_compiler -p "C:\Visual Studio 2013\myProjectFolder" -v /-u "C:\CompiledFilesFolder"
您的代码也适用于powershell。这是一个稍微改进的方法:
$aspnetCompiler = (Join-Path $env:windir 'Microsoft.NET\Framework64\v4.0.30319\aspnet_compiler')
& $aspnetCompiler -p "C:\Visual Studio 2013\myProjectFolder" -v /-u "C:\CompiledFilesFolder"
在命令提示符中,我会使用:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_compiler -p "C:\Visual Studio 2013\myProjectFolder" -v /-u "C:\CompiledFilesFolder"
您的代码也适用于powershell。这是一个稍微改进的方法:
$aspnetCompiler = (Join-Path $env:windir 'Microsoft.NET\Framework64\v4.0.30319\aspnet_compiler')
& $aspnetCompiler -p "C:\Visual Studio 2013\myProjectFolder" -v /-u "C:\CompiledFilesFolder"