I have an ASP.Net application. I want to deploy to the remote Windows machine. I have a shared wwwroot
folder. To deploy from cmd
use the following command
c:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe" "C:\path_to_project" /p:SolutionDir="path_to_solution_dir" /p:DeployOnBuild=true /p:Configuration=Release /p:PublishProfile="Profile.pubxml"
The profile looks the following way
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>FileSystem</WebPublishMethod>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<publishUrl>\\<ip_address>\wwwroot</publishUrl>
<DeleteExistingFiles>True</DeleteExistingFiles>
</PropertyGroup>
</Project>
From command line it work fine. But when I put the same thing into Jenkins pipeline script using Batch plugin, I get the next error
error MSB3191: Unable to create directory "\\<ip_address>\wwwroot".
Could not find a part of the path '\\<ip_address>\wwwroot'
What's wrong with Jenkins? Are there any problems with configuration settings? Maybe I need to change the approach for deployment?