我的项目结构大致与此类似
Root
MyProject.Web
App
js
sass
img
other stuff..
other stuff...
other stuff...
由于某种原因,msdeploy突然停止在sass
目录上复制。我知道从经验中检查的一些事情:
<Content Include="App\**\*" />
上的通配符完成的。我在几个项目中使用了它,事实上它之前在这个项目上工作。CollectFilesFromContent
步骤中列出。然而在CopyAllFilesToSingleFolderForMsdeploy
步骤
我是通过将MsBuild
指向MyProject.Web.csproj
并使用以下参数从CI启动此功能
/p:DeployTarget=MSDeployPublish /p:Configuration=QA /p:MsDeployServiceUrl="https://${bamboo.deployServer}:8172/MsDeploy.axd";DeployIisAppPath="${bamboo.deploySite}";username="${bamboo.deployUser}";password="${bamboo.deployPassword}" /p:SolutionDir=${bamboo.build.working.directory}\ /p:DeployOnBuild=True /p:MSDeployPublishMethod=WMSVC /p:AllowUntrustedCertificate=True /p:AllowUnsafeBlocks=true
这是我的日志的截断副本,应该演示我在说什么
build 12-Feb-2016 18:57:04 CollectFilesFromContent:
build 12-Feb-2016 18:57:04 Gather all files from Project items @(Content). Adding:
build 12-Feb-2016 18:57:04
App\img\loading.gif;
<...snip...>
App\js\app.js;
App\js\directives\adminNavigation.js;
<...snip...>
App\js\screens\myTime\listView.html;
<...snip...>
App\sass\admin.css;
App\sass\admin.scss;
App\sass\home.css;
App\sass\home.scss;
App\sass\lib\_normalize.scss;
App\sass\login.css;
App\sass\login.scss;
<...snip...>
build 12-Feb-2016 18:57:04 CollectFilesFromIntermediateSatelliteAssembliesWithTargetPath:
build 12-Feb-2016 18:57:04 Gather all files from Project output (IntermediateSatelliteAssembliesWithTargetPath). Adding:
build 12-Feb-2016 18:57:04 CollectFilesFromReference:
build 12-Feb-2016 18:57:04 Gather all files from Project items @(ReferenceCopyLocalPaths,ReferenceComWrappersToCopyLocal,ResolvedIsolatedComModules,_DeploymentLooseManifestFile,NativeReferenceFile).
build 12-Feb-2016 18:57:04 CollectFilesFromAllExtraReferenceFiles:
build 12-Feb-2016 18:57:04 Gather all files from Project items @(AllExtraReferenceFiles). Adding:
build 12-Feb-2016 18:57:04 CollectFilesFrom_SourceItemsToCopyToOutputDirectory:
build 12-Feb-2016 18:57:04 Gather all files from Project items @(_SourceItemsToCopyToOutputDirectoryAlways,_SourceItemsToCopyToOutputDirectory). Adding:
build 12-Feb-2016 18:57:04 bin\Version.txt
build 12-Feb-2016 18:57:04 CollectFilesFrom_binDeployableAssemblies:
build 12-Feb-2016 18:57:04 Gather all files from Project items @(_binDeployableAssemblies). Adding:
build 12-Feb-2016 18:57:05 PipelineCollectFilesPhase:
build 12-Feb-2016 18:57:05 Publish Pipeline Collect Files Phase
build 12-Feb-2016 18:57:05 PreTransformWebConfig:
build 12-Feb-2016 18:57:05 Found The following for Config tranformation:
build 12-Feb-2016 18:57:05 Web.config
build 12-Feb-2016 18:57:05 Creating directory "E:\CI_BUILD_DIRECTORY\obj\QA\TransformWebConfig\transformed\".
build 12-Feb-2016 18:57:05 Creating directory "E:\CI_BUILD_DIRECTORY\obj\QA\TransformWebConfig\transformed\Views\".
build 12-Feb-2016 18:57:05 Copying Web.config to obj\QA\TransformWebConfig\original\Web.config.
build 12-Feb-2016 18:57:05 Copying E:\CI_BUILD_DIRECTORY\Web.QA.config to obj\QA\TransformWebConfig\assist\Web.config.
build 12-Feb-2016 18:57:05 TransformWebConfigCore:
<...snip...>
build 12-Feb-2016 18:57:05 Transformation succeeded
build 12-Feb-2016 18:57:05 PostTransformWebConfig:
build 12-Feb-2016 18:57:05 Transformed Web.config using E:\CI_BUILD_DIRECTORY\Web.QA.config into obj\QA\TransformWebConfig\transformed\Web.config.
build 12-Feb-2016 18:57:05 PipelineTransformPhase:
build 12-Feb-2016 18:57:05 Publish Pipeline Transform Phase
build 12-Feb-2016 18:57:05 PreAutoParameterizationWebConfigConnectionStrings:
build 12-Feb-2016 18:57:05 Creating directory "E:\CI_BUILD_DIRECTORY\obj\QA\CSAutoParameterize\transformed\Views\".
build 12-Feb-2016 18:57:05 Copying Views\Web.config to obj\QA\CSAutoParameterize\original\Views\Web.config.
build 12-Feb-2016 18:57:05 Copying obj\QA\TransformWebConfig\transformed\Web.config to obj\QA\CSAutoParameterize\original\Web.config.
build 12-Feb-2016 18:57:05 AutoParameterizationWebConfigConnectionStringsCore:
build 12-Feb-2016 18:57:05 Transforming Source File: E:\CI_BUILD_DIRECTORY\Views\Web.config
<...snip...>
build 12-Feb-2016 18:57:05 Transformation succeeded
build 12-Feb-2016 18:57:05 Transforming Source File: E:\CI_BUILD_DIRECTORY\obj\QA\TransformWebConfig\transformed\Web.config
build 12-Feb-2016 18:57:05 Applying Transform File: <?xml version="1.0"?>
<...snip...>
build 12-Feb-2016 18:57:05 Transformation succeeded
build 12-Feb-2016 18:57:05 PostAutoParameterizationWebConfigConnectionStrings:
build 12-Feb-2016 18:57:05 Auto ConnectionString Transformed Views\Web.config into obj\QA\CSAutoParameterize\transformed\Views\Web.config.
build 12-Feb-2016 18:57:05 Auto ConnectionString Transformed obj\QA\TransformWebConfig\transformed\Web.config into obj\QA\CSAutoParameterize\transformed\Web.config.
build 12-Feb-2016 18:57:05 PipelineMsdeploySpecificTransformPhase:
build 12-Feb-2016 18:57:05 Publish Pipeline Deploy phase Stage PipelineMsdeploySpecificTransformPhase
build 12-Feb-2016 18:57:05 CopyAllFilesToSingleFolderForMsdeploy:
build 12-Feb-2016 18:57:05 Creating directory "obj\QA\Package\PackageTmp".
build 12-Feb-2016 18:57:05 Copying all files to temporary location below for package/publish:
build 12-Feb-2016 18:57:05 obj\QA\Package\PackageTmp.
build 12-Feb-2016 18:57:05 Copying bin\MyProject.Web.dll to obj\QA\Package\PackageTmp\bin\MyProject.Web.dll.
build 12-Feb-2016 18:57:05 Copying bin\MyProject.Web.pdb to obj\QA\Package\PackageTmp\bin\MyProject.Web.pdb.
build 12-Feb-2016 18:57:05 Copying App\img\loading.gif to obj\QA\Package\PackageTmp\App\img\loading.gif.
<...snip...>
build 12-Feb-2016 18:57:05 Copying App\js\app.js to obj\QA\Package\PackageTmp\App\js\app.js.
build 12-Feb-2016 18:57:05 Copying App\js\directives\adminNavigation.js to obj\QA\Package\PackageTmp\App\js\directives\adminNavigation.js.
<...snip...>
build 12-Feb-2016 18:57:05 Copying App\js\screens\myTime\listView.html to obj\QA\Package\PackageTmp\App\js\screens\myTime\listView.html.
<...other files BUT NOT the sass directory...>
因此收集此目录以进行部署,但之后并未实际部署。我对如何进一步调试这一点感到茫然!
答案 0 :(得分:0)
经过一天的随机猜测后,我发现问题似乎是由于某种原因是实际的目录名sass
。将目录重命名为css
修复了问题!
这显然是疯了。除非msdeploy中有一个硬编码的文件夹列表,否则我无法想象这是如何工作的。如果有人有任何细节,请发一个答案,我会接受。