创建批处理文件以发布网站ASP.net

6 asp.net batch-file web-deployment web visual-studio-2012

我创建了一个批处理文件,但它没有发布.这是我的剧本: -

set msbuildpath=C:\Windows\Microsoft.NET\Framework\v4.0.30319
"%msbuildpath%\msbuild" "MyWeb.sln" /t:ReBuild /p:Configuration=Release/p:DeployOnBuild=true /p:PublishProfile=D:\BlaBla\SourceCode\blabla\Properties\PublishProfiles\Pub_Test.pubxml
pause
Run Code Online (Sandbox Code Playgroud)

这有什么不对?

小智 2

您好,经过许多文章后,我终于找到了解决方案。

C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild MyWeb.csproj /p:DeployOnBuild=true /p:PublishProfile=D:\BlaBla\SourceCode\blabla\Properties\PublishProfiles\Pub_Test.pubxml /p:Password=myPassWord /p:AllowUntrustedCertificate=true /p:VisualStudioVersion=11.0
Run Code Online (Sandbox Code Playgroud)

这对我有用。