Проект не был опубликован после сборки приложения, TFS с компоновкой Jenkins.
В команде BUILD, используя команду «Выполнить патч windows», приведенную ниже конфигурацию, нужно запустить Jenkins. Из TFS он получает проект ипереехал в другое место, наконец, его сборка приложения.после сборки проект не публикуется.
1.windows patch command
REM Get the date string to use as folder name (MMDDYYYY)
set dateStr=%date:~4,2%%date:~7,2%%date:~10,4%
REM The location of this script file and past builds
set rootPub=D:\JK_BatchScripts\WebStaging_Publish
REM Pub = location of this file\MMDDYYYY
set pub=%rootPub%\%dateStr%
REM Create the publish directory
mkdir "%pub%"
REM The location of the Jenkins “Build” (actually a TFS get latest)
set rootBuild=C:\Program Files (x86)\Jenkins\workspace\WebStaging_TFS_ContinuousIntegration
REM Copy all of the Jenkins build files (Source files from TFS) into the publish directory (copy of latest build)
xcopy "%rootBuild%" "%pub%" /E /Y /C /J /Q
REM The location of the MSBuild executable
set msBuildLoc=C:\Program Files (x86)\MSBuild\14.0\Bin
REM Use MSBuild to build and publish the project code files for the web project using the provided publish profile.
"%msBuildLoc%\MSBuild" "%pub%\MyWebApp\MyWebApp.csproj" /p:VisualStudioVersion=14.0 /p:Configuration=Release /p:DeployOnBuild=true,PublishProfile="%rootPub%\publish.pubxml"
2.Publish.pubxml
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>FileSystem</WebPublishMethod>
<PublishProvider>FileSystem</PublishProvider>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data> <publishUrl>D:\JK_BatchScripts\WebStaging_Published</publishUrl>
<DeleteExistingFiles>True</DeleteExistingFiles>
</PropertyGroup>
</Project>