So etwas wieWie kann ich die Site über die Befehlszeile mit einem Veröffentlichungsprofil veröffentlichen?
msbuild /t:publish [use PublishProfileName] someproject.csproj
So etwas wieWie kann ich die Site über die Befehlszeile mit einem Veröffentlichungsprofil veröffentlichen?
msbuild /t:publish [use PublishProfileName] someproject.csproj
msbuild MyProject.csproj /t:PipelinePreDeployCopyAllFilesToOneFolder /p:Configuration=Release;_PackageTempDir=C:\temp\somelocation;AutoParameterizationWebConfigConnectionStrings=false
MSBuild 2010 - how to publish web app to a specific location (nant)?
für Visual Studio 2012 finden Sie
msbuild MySolution.sln /p:DeployOnBuild=true;PublishProfile=Production;Password=foo
ASP.NET Web Deployment using Visual Studio: Command Line Deployment Siehe
verwenden können Dies ist eine alternative Lösung für Pavel-Lösung zu erzielen, aber MsBuild Ziel in einer MsBuild Datei:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="build"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<OutputDirectory>$(DeploymentProject)\bin\$(Configuration)</OutputDirectory>
<OutputPath>C:\Inetpub\wwwroot</OutputPath>
</PropertyGroup>
<Target Name="build">
<MSBuild
Projects="Your Solution File.sln"
Properties="Configuration=$(Configuration);DeployOnBuild=true;DeployTarget=Package;_PackageTempDir=$(OutputPath);AutoParameterizationWebConfigConnectionStrings=false"
>
</MSBuild>
</Target>
</Project>
Meine web.config endet wie folgt aus, nachdem das msbuild Befehl ausführen: \t
@Jhonny Sie benötigen den Parameter AutoParameterizationWebConfigConnectionStrings, ich habe meine Antwort aktualisiert. –
Es hat gut für mich funktioniert, vielen Dank !! –