I have Solution(.sln) file , SLN have multiple project(.csproj). I need to publish all project in individual project Folder. I am using below powershell command , This below command publish all project into one folder instead of Individual Project Folder , Is there any ways to publish in individual project folder.
Powershell Command:
$sln ="E:\Webproject.sln"
$msbuild = "C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe"
& $msbuild $sln /p:Configuration=Test /p:DeployOnBuild=true /p:PublishProfile="E:\FolderProfile.pubxml" /MaxCpuCount:8 /p:Configuration=Release /t:Rebuild /p:Platform="Any CPU" -clp:ErrorsOnly
Here iS below E:\FolderProfile.pubxml File
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<DeleteExistingFiles>True</DeleteExistingFiles>
<ExcludeApp_Data>False</ExcludeApp_Data>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<PublishProvider>FileSystem</PublishProvider>
<PublishUrl>C:\publishtemp</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod>
<SiteUrlToLaunchAfterPublish />
</PropertyGroup>
</Project>